2019-02-16 16:04:40 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Helpers
|
|
|
|
|
{
|
|
|
|
|
public sealed class TokenState
|
|
|
|
|
{
|
|
|
|
|
public long NetworkId { get; set; }
|
|
|
|
|
public DateTime RequestTime { get; set; } = DateTime.Now;
|
|
|
|
|
public TimeSpan TokenDuration { get; set; }
|
|
|
|
|
public string Token { get; set; }
|
2022-01-26 11:32:16 -05:00
|
|
|
|
|
|
|
|
|
public string RemainingTime => Math.Round(-(DateTime.Now - RequestTime).Subtract(TokenDuration).TotalMinutes, 1)
|
|
|
|
|
.ToString();
|
2019-02-16 16:04:40 -05:00
|
|
|
|
}
|
2022-01-26 11:32:16 -05:00
|
|
|
|
}
|