public SpecificationService( Configuration configuration, BehaviorSource behaviors, ITypeDescriptorCache typeCache, IDescriptionConvention <BehaviorChain, ModuleDescription> moduleConvention, IDescriptionConvention <BehaviorChain, ResourceDescription> resourceConvention, IDescriptionConvention <BehaviorChain, EndpointDescription> endpointConvention, IDescriptionConvention <PropertyInfo, MemberDescription> memberConvention, IDescriptionConvention <BehaviorChain, List <StatusCodeDescription> > statusCodeConvention, IDescriptionConvention <BehaviorChain, List <HeaderDescription> > headerConvention, IDescriptionConvention <BehaviorChain, List <MimeTypeDescription> > mimeTypeConvention, TypeGraphFactory typeGraphFactory, BodyDescriptionFactory bodyDescriptionFactory, OptionFactory optionFactory) { _configuration = configuration; _behaviors = behaviors; _typeCache = typeCache; _moduleConvention = moduleConvention; _resourceConvention = resourceConvention; _endpointConvention = endpointConvention; _memberConvention = memberConvention; _statusCodeConvention = statusCodeConvention; _typeGraphFactory = typeGraphFactory; _bodyDescriptionFactory = bodyDescriptionFactory; _optionFactory = optionFactory; _headerConvention = headerConvention; _mimeTypeConvention = mimeTypeConvention; }
public SpecificationService( Configuration configuration, BehaviorSource behaviors, ITypeDescriptorCache typeCache, IDescriptionConvention<BehaviorChain, ModuleDescription> moduleConvention, IDescriptionConvention<BehaviorChain, ResourceDescription> resourceConvention, IDescriptionConvention<BehaviorChain, EndpointDescription> endpointConvention, IDescriptionConvention<PropertyInfo, MemberDescription> memberConvention, IDescriptionConvention<BehaviorChain, List<StatusCodeDescription>> statusCodeConvention, IDescriptionConvention<BehaviorChain, List<HeaderDescription>> headerConvention, IDescriptionConvention<BehaviorChain, List<MimeTypeDescription>> mimeTypeConvention, TypeGraphFactory typeGraphFactory, BodyDescriptionFactory bodyDescriptionFactory, OptionFactory optionFactory) { _configuration = configuration; _behaviors = behaviors; _typeCache = typeCache; _moduleConvention = moduleConvention; _resourceConvention = resourceConvention; _endpointConvention = endpointConvention; _memberConvention = memberConvention; _statusCodeConvention = statusCodeConvention; _typeGraphFactory = typeGraphFactory; _bodyDescriptionFactory = bodyDescriptionFactory; _optionFactory = optionFactory; _headerConvention = headerConvention; _mimeTypeConvention = mimeTypeConvention; }
public SpecificationService( Configuration configuration, BehaviorSource behaviors, ITypeDescriptorCache typeCache, IDescriptionConvention <BehaviorChain, ModuleDescription> moduleConvention, IDescriptionConvention <BehaviorChain, ResourceDescription> resourceConvention, IDescriptionConvention <BehaviorChain, EndpointDescription> endpointConvention, IDescriptionConvention <PropertyInfo, MemberDescription> memberConvention, IDescriptionConvention <FieldInfo, OptionDescription> optionConvention, IDescriptionConvention <BehaviorChain, List <StatusCodeDescription> > statusCodeConvention, IDescriptionConvention <BehaviorChain, List <HeaderDescription> > headerConvention, IDescriptionConvention <System.Type, TypeDescription> typeConvention, MergeService mergeService) { _configuration = configuration; _behaviors = behaviors; _typeCache = typeCache; _moduleConvention = moduleConvention; _resourceConvention = resourceConvention; _endpointConvention = endpointConvention; _memberConvention = memberConvention; _optionConvention = optionConvention; _statusCodeConvention = statusCodeConvention; _typeConvention = typeConvention; _mergeService = mergeService; _headerConvention = headerConvention; }
public void should_enumerate_actions_in_all_assemblies_except_the_swank_assembly_by_default() { _graph.AddAction<GetHandler>("GET"); var chains = new BehaviorSource(_graph, new Configuration()).GetChains(); chains.Count.ShouldEqual(4); chains.All(x => x.FirstCall().HandlerType.Assembly == Assembly.GetExecutingAssembly()).ShouldBeTrue(); }
public void should_only_enumerate_actions_in_the_specified_assemblies() { _graph.AddAction<GetHandler>("GET"); var configuration = Swank.CreateConfig(x => x.AppliesTo<Tests>()); var chains = new BehaviorSource(_graph, configuration).GetChains(); chains.Count.ShouldEqual(4); chains.All(x => x.FirstCall().HandlerType.Assembly == Assembly.GetExecutingAssembly()).ShouldBeTrue(); }
public void should_filter_actions_based_on_filter_in_the_configuration() { var configuration = Swank.CreateConfig(x => x .AppliesToThisAssembly() .Where(y => y.Route.Pattern.StartsWith("/handlers/widget"))); var chains = new BehaviorSource(_graph, configuration).GetChains(); chains.Count.ShouldEqual(2); chains.All(x => x.Route.Pattern.StartsWith("/handlers/widget")).ShouldBeTrue(); }