服务端不暂支持 .net framework ,支持最新 .netcore 添加七牛接口的支持,客户端修改了已知的bug 并对layui支持, .net framework版本的可以下载v1.0.0 分支

This commit is contained in:
Jackson.Bruce
2020-03-30 17:19:46 +08:00
parent 3a43684ea0
commit 2515e9dc3d
3 changed files with 6 additions and 6 deletions

View File

@@ -26,19 +26,19 @@ namespace Ufangx.FileServices
public IEnumerable<string> AuthenticationSchemes => options.AuthenticationSchemes;
public string DefaultSchemeName => options.DefaultTopic;
public string DefaultSchemeName => options.DefaultScheme;
FileServiceScheme GetScheme(string name) {
if (string.IsNullOrWhiteSpace(name))
{
throw new ArgumentException("message", nameof(name));
}
var topic = options.SchemeMap[name];
if (topic == null)
var scheme = options.SchemeMap[name];
if (scheme == null)
{
throw new Exception($"无效的文件服务方案名称“{name}”");
}
return topic;
return scheme;
}
public IFileHandler GetHandler(string schemeName)
{

View File

@@ -9,7 +9,7 @@ namespace Ufangx.FileServices.Models
{
private readonly IList<FileServiceScheme> _schemes = new List<FileServiceScheme>();
private readonly IList<string> _authenticationSchemes = new List<string>();
public string DefaultTopic { get; set; }
public string DefaultScheme { get; set; }
public IEnumerable<FileServiceScheme> Schemes => _schemes;
public IEnumerable<string> AuthenticationSchemes => _authenticationSchemes;
public IDictionary<string, FileServiceScheme> SchemeMap { get; } = new Dictionary<string, FileServiceScheme>(StringComparer.Ordinal);