Пример #1
0
        private static void AppendMethod(IRouteDefinition route, ActionCallBase call, IEnumerable <PropertyInfo> properties, IEnumerable <Regex> ignore)
        {
            var part = RemovePattern(call.Method.Name, ignore);

            Append(route, properties, part);
            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());
            }
        }
Пример #2
0
        public RoutedChain(IRouteDefinition route, Type inputType, Type resourceType) : this(route)
        {
            if (inputType != null)
            {
                route.ApplyInputType(inputType);
            }

            if (resourceType != null)
            {
                ResourceType(resourceType);
            }
        }
Пример #3
0
        public static void Alter(IRouteDefinition route, ActionCall call, IConfigurationObserver observer)
        {
            var properties = call.HasInput
                                 ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                                 : new string[0];

            Alter(route, call.Method.Name, properties, text => observer.RecordCallStatus(call, text));

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());
            }
        }
Пример #4
0
        public static void Alter(IRouteDefinition route, ActionCall call)
        {
            var properties = call.HasInput
                                 ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                                 : new string[0];

            Alter(route, call.Method.Name, properties, text => call.Trace(text));

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());
            }
        }
Пример #5
0
        public static void Alter(IRouteDefinition route, ActionCall call, IConfigurationObserver observer)
        {
            var properties = call.HasInput
                                 ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                                 : new string[0];

            Alter(route, call.Method.Name, properties, text => observer.RecordCallStatus(call, text));

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());
            }
        }
Пример #6
0
        public static void Alter(IRouteDefinition route, ActionCall call)
        {
            var properties = call.HasInput
                                 ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                                 : new string[0];

            Alter(route, call.Method.Name, properties, text => call.Trace(text));

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());
            }
        }
Пример #7
0
        public static void Alter(IRouteDefinition route, ActionCall call)
        {
            var properties = call.HasInput
                ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                : new string[0];

            Alter(route, call.Method.Name, properties);

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());

                if (call.InputType().CanBeCastTo <ResourcePath>())
                {
                    ResourcePath.AddResourcePathInputs(route);
                }
            }
        }
Пример #8
0
        public static void Alter(IRouteDefinition route, ActionCall call)
        {
            var properties = call.HasInput
                ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                : new string[0];

            Alter(route, call.Method.Name, properties);

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());

                if (call.InputType().CanBeCastTo<ResourcePath>())
                {

                     ResourcePath.AddResourcePathInputs(route);
                }
            }
        }
 private static void AppendMethod(IRouteDefinition route, ActionCallBase call, IEnumerable<PropertyInfo> properties, IEnumerable<Regex> ignore)
 {
     var part = RemovePattern(call.Method.Name, ignore);
     Append(route, properties, part);
     if (call.HasInput) route.ApplyInputType(call.InputType());
 }
Пример #10
0
 public RoutedChain(IRouteDefinition route, Type inputType)
     : this(route)
 {
     if (inputType != null) route.ApplyInputType(inputType);
 }