Files
simapi-net/Configurations/SimApiOptions.cs
T

29 lines
1.0 KiB
C#
Raw Normal View History

using System;
namespace SimApi.Configs
{
public class SimApiOptions
{
2021-06-05 14:30:52 +08:00
public bool EnableCors { get; set; } = true;
public bool EnableSimApiAuth { get; set; } = false;
public bool EnableSimApiDoc { get; set; } = true;
public bool EnableSimApiException { get; set; } = true;
public bool EnableSimApiStorage { get; set; } = false;
public bool EnableForwardHeaders { get; set; } = true;
public bool EnableLowerUrl { get; set; } = true;
2021-06-28 05:36:54 +08:00
public bool EnableLogger { get; set; } = true;
2021-06-05 14:33:59 +08:00
public SimApiDocOptions SimApiDocOptions { get; set; } = new SimApiDocOptions();
public SimApiStorageOptions SimApiStorageOptions { get; set; } = new SimApiStorageOptions();
public void ConfigureSimApiDoc(Action<SimApiDocOptions> options = null)
{
options?.Invoke(SimApiDocOptions);
}
public void ConfigureSimApiStorage(Action<SimApiStorageOptions> options = null)
{
options?.Invoke(SimApiStorageOptions);
}
}
}