Elmah.ManifestResourceHandler.Create C# (CSharp) Méthode

Create() public static méthode

public static Create ( IEnumerable resourceNames, string mediaType ) : Action
resourceNames IEnumerable
mediaType string
Résultat Action
        public static Action<HttpContextBase> Create(IEnumerable<string> resourceNames, string mediaType)
        {
            return Create(resourceNames, mediaType, null, false);
        }

Same methods

ManifestResourceHandler::Create ( IEnumerable resourceNames, string mediaType, System.Text.Encoding responseEncoding, bool cacheResponse ) : Action
ManifestResourceHandler::Create ( string resourceName, string mediaType ) : Action
ManifestResourceHandler::Create ( string resourceName, string mediaType, System.Text.Encoding responseEncoding ) : Action

Usage Example

        private static IHttpHandler FindHandler(string name)
        {
            Debug.Assert(name != null);

            switch (name)
            {
            case "detail":
                return(CreateTemplateHandler <ErrorDetailPage>());

            case "html":
                return(new ErrorHtmlPage());

            case "delete":
                return(new DelegatingHttpHandler(ErrorDeletionHandler.ProcessRequest));

            case "truncate":
                return(new DelegatingHttpHandler(ErrorTruncationHandler.ProcessRequest));

            case "xml":
                return(new DelegatingHttpHandler(ErrorXmlHandler.ProcessRequest));

            case "json":
                return(new DelegatingHttpHandler(ErrorJsonHandler.ProcessRequest));

            case "rss":
                return(new DelegatingHttpHandler(ErrorRssHandler.ProcessRequest));

            case "digestrss":
                return(new DelegatingHttpHandler(ErrorDigestRssHandler.ProcessRequest));

            case "download":
                    #if NET_3_5 || NET_4_0
                return(new HttpAsyncHandler((context, getAsyncCallback) => HttpTextAsyncHandler.Create(ErrorLogDownloadHandler.ProcessRequest)(context, getAsyncCallback)));
                    #else
                return(new DelegatingHttpTaskAsyncHandler(ErrorLogDownloadHandler.ProcessRequestAsync));
                    #endif
            case "stylesheet":
                return(new DelegatingHttpHandler(ManifestResourceHandler.Create(StyleSheetHelper.StyleSheetResourceNames, "text/css", Encoding.GetEncoding("Windows-1252"), true)));

            case "test":
                throw new TestException();

            case "about":
                return(CreateTemplateHandler <AboutPage>());

            default:
                return(name.Length == 0 ? CreateTemplateHandler <ErrorLogPage>() : null);
            }
        }
All Usage Examples Of Elmah.ManifestResourceHandler::Create
ManifestResourceHandler