diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-24 15:21:37 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-02-24 15:21:37 -0500 |
| commit | a73eeac6869edc199c4d0915d07b6847d0c95524 (patch) | |
| tree | 378241f264bbd6106ea6e958e5bf346d1f76b86e /ServiceStack/ServiceStackHost.Runtime.cs | |
| parent | c456490de43082f008dd592345e76cf75db1ad0a (diff) | |
| parent | cd6b7f3bdc5bcbc6c68131cc40b71b68ac1b73a6 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/Emby
Diffstat (limited to 'ServiceStack/ServiceStackHost.Runtime.cs')
| -rw-r--r-- | ServiceStack/ServiceStackHost.Runtime.cs | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/ServiceStack/ServiceStackHost.Runtime.cs b/ServiceStack/ServiceStackHost.Runtime.cs deleted file mode 100644 index aaa50633b..000000000 --- a/ServiceStack/ServiceStackHost.Runtime.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Service Stack LLC. All Rights Reserved. -// License: https://raw.github.com/ServiceStack/ServiceStack/master/license.txt - - -using MediaBrowser.Model.Services; -using ServiceStack.Support.WebHost; - -namespace ServiceStack -{ - public abstract partial class ServiceStackHost - { - /// <summary> - /// Applies the request filters. Returns whether or not the request has been handled - /// and no more processing should be done. - /// </summary> - /// <returns></returns> - public virtual void ApplyRequestFilters(IRequest req, IResponse res, object requestDto) - { - //Exec all RequestFilter attributes with Priority < 0 - var attributes = FilterAttributeCache.GetRequestFilterAttributes(requestDto.GetType()); - var i = 0; - for (; i < attributes.Length && attributes[i].Priority < 0; i++) - { - var attribute = attributes[i]; - attribute.RequestFilter(req, res, requestDto); - } - - //Exec global filters - foreach (var requestFilter in GlobalRequestFilters) - { - requestFilter(req, res, requestDto); - } - - //Exec remaining RequestFilter attributes with Priority >= 0 - for (; i < attributes.Length && attributes[i].Priority >= 0; i++) - { - var attribute = attributes[i]; - attribute.RequestFilter(req, res, requestDto); - } - } - - /// <summary> - /// Applies the response filters. Returns whether or not the request has been handled - /// and no more processing should be done. - /// </summary> - /// <returns></returns> - public virtual void ApplyResponseFilters(IRequest req, IResponse res, object response) - { - //Exec global filters - foreach (var responseFilter in GlobalResponseFilters) - { - responseFilter(req, res, response); - } - } - } - -}
\ No newline at end of file |
