protected virtual RouteBase ProcessRoute(RouteConfigurationElement element) { Type handlerType = DetermineHandlerType(element); ValueDictionary defaults = ProcessDefaults(element.Defaults); ValueDictionary tokens = ProcessTokens(element.Tokens); IEnumerable<IRouteConstraint> constraints = ProcessConstraints(element.Constraints); RouteDescriptor descriptor = new RouteDescriptor( element.Url, element.Type, element.Attributes, handlerType); return CreateRoute(descriptor, defaults, tokens, constraints); }
protected virtual Type DetermineHandlerType(RouteConfigurationElement element) { Type defaultType = Configurations.Configuration.Instance.DefaultHandlerType; Type type = Type.GetType(element.HandlerType, false, true); return type ?? defaultType; }