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)); }
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)); }