示例#1
0
        private static Func <IHttpHandler> FindHttpHandler(CustomErrorsSection customErrorsSection, string customErrorId)
        {
            var  customErrorsSectionSyn = new CustomErrorsSectionSyn(customErrorsSection);
            var  customErrorSyn         = new CustomErrorSyn(customErrorsSection.Errors[customErrorId]);
            Type httpHandlerType        = null;

            try
            {
                httpHandlerType = customErrorsSectionSyn.DefaultUrlRoutingType;
                if (customErrorSyn.UrlRoutingType != null)
                {
                    httpHandlerType = customErrorSyn.UrlRoutingType;
                }
            }
            catch { }
            return(httpHandlerType == null ? (Func <IHttpHandler>)null : () => (IHttpHandler)Activator.CreateInstance(httpHandlerType));
        }
示例#2
0
 private static Func<IHttpHandler> FindHttpHandler(CustomErrorsSection customErrorsSection, string customErrorId)
 {
     var customErrorsSectionSyn = new CustomErrorsSectionSyn(customErrorsSection);
     var customErrorSyn = new CustomErrorSyn(customErrorsSection.Errors[customErrorId]);
     Type httpHandlerType = null;
     try
     {
         httpHandlerType = customErrorsSectionSyn.DefaultUrlRoutingType;
         if (customErrorSyn.UrlRoutingType != null)
             httpHandlerType = customErrorSyn.UrlRoutingType;
     }
     catch { }
     return (httpHandlerType == null ? (Func<IHttpHandler>)null : () => (IHttpHandler)Activator.CreateInstance(httpHandlerType));
 }