新的配置方式,新的SimApiStorage,移除了SimApiUPload

This commit is contained in:
2021-06-03 13:43:46 +08:00
parent 8f41ba0150
commit 3ec378c4fa
8 changed files with 377 additions and 294 deletions
+27
View File
@@ -0,0 +1,27 @@
using System;
namespace SimApi.Configs
{
public class SimApiOptions
{
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;
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);
}
}
}