in all in one
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace CarParkValidationAPI.Models
|
||||
{
|
||||
public class AppSettings
|
||||
{
|
||||
public string Secret { get; set; }
|
||||
public string SQLConnectionString { get; set; }
|
||||
public string LDAPPath { get; set; }
|
||||
public string LDAPUser { get; set; }
|
||||
public string LDAPPassword { get; set; }
|
||||
|
||||
public string LoginWebAPI { get; set; }
|
||||
/// <summary>
|
||||
/// for convert to time. use GetADTimeOut
|
||||
/// TimeSpan.FromSeconds(Convert.ToDouble(ConfigurationManager.AppSettings["ADTimeOut"]));
|
||||
public string ADTimeOut { get; set; }
|
||||
|
||||
public TimeSpan GetADTimeOut()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ADTimeOut))
|
||||
return TimeSpan.FromSeconds(Convert.ToDouble(ADTimeOut));
|
||||
else
|
||||
return TimeSpan.FromSeconds(0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user