diff options
| author | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
|---|---|---|
| committer | stefan <stefan@hegedues.at> | 2018-09-12 19:26:21 +0200 |
| commit | 48facb797ed912e4ea6b04b17d1ff190ac2daac4 (patch) | |
| tree | 8dae77a31670a888d733484cb17dd4077d5444e8 /Emby.Server.Implementations/Services/ServicePath.cs | |
| parent | c32d8656382a0eacb301692e0084377fc433ae9b (diff) | |
Update to 3.5.2 and .net core 2.1
Diffstat (limited to 'Emby.Server.Implementations/Services/ServicePath.cs')
| -rw-r--r-- | Emby.Server.Implementations/Services/ServicePath.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Services/ServicePath.cs b/Emby.Server.Implementations/Services/ServicePath.cs index 0ca36df19..282269e7b 100644 --- a/Emby.Server.Implementations/Services/ServicePath.cs +++ b/Emby.Server.Implementations/Services/ServicePath.cs @@ -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) + { + } + } } }
\ No newline at end of file |
