Update to 3.5.2 and .net core 2.1

This commit is contained in:
stefan
2018-09-12 19:26:21 +02:00
parent c32d865638
commit 48facb797e
1419 changed files with 27525 additions and 88927 deletions

View File

@@ -48,6 +48,8 @@ namespace Emby.Server.Implementations.Services
public Type RequestType { get; private set; }
public Type ServiceType { get; private set; }
public string Path { get { return this.restPath; } }
public string Summary { get; private set; }
@@ -56,6 +58,11 @@ namespace Emby.Server.Implementations.Services
public int Priority { get; set; } //passed back to RouteAttribute
public IEnumerable<string> PathVariables
{
get { return this.variablesNames.Where(e => !string.IsNullOrWhiteSpace(e)); }
}
public static string[] GetPathPartsForMatching(string pathInfo)
{
return pathInfo.ToLower().Split(new[] { PathSeperatorChar }, StringSplitOptions.RemoveEmptyEntries);
@@ -93,9 +100,10 @@ namespace Emby.Server.Implementations.Services
return list;
}
public RestPath(Func<Type, object> createInstanceFn, Func<Type, Func<string, object>> getParseFn, Type requestType, string path, string verbs, bool isHidden = false, string summary = null, string description = null)
public RestPath(Func<Type, object> createInstanceFn, Func<Type, Func<string, object>> getParseFn, Type requestType, Type serviceType, string path, string verbs, bool isHidden = false, string summary = null, string description = null)
{
this.RequestType = requestType;
this.ServiceType = serviceType;
this.Summary = summary;
this.IsHidden = isHidden;
this.Description = description;
@@ -558,5 +566,12 @@ namespace Emby.Server.Implementations.Services
return this.typeDeserializer.PopulateFromMap(fromInstance, requestKeyValuesMap);
}
public class RestPathMap : SortedDictionary<string, List<RestPath>>
{
public RestPathMap() : base(StringComparer.OrdinalIgnoreCase)
{
}
}
}
}