public ObjectBlockWriter(ITypeDescriptorCache cache, IServiceLocator services, IBlockWriterLibrary writerLibrary, BlockRegistry blocks)
 {
     _cache         = cache;
     _services      = services;
     _writerLibrary = writerLibrary;
     _blocks        = blocks;
 }
 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;
 }
Ejemplo n.º 3
0
 public ModelBinderCache(IEnumerable<IModelBinder> binders, IPropertyBinderCache propertyBinders, ITypeDescriptorCache types)
     : this()
 {
     // DO NOT put the standard model binder at top
     _binders.AddRange(binders.Where(x => !(x is StandardModelBinder)));
     _binders.Add(new StandardModelBinder(propertyBinders, types));
 }
 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 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;
 }
Ejemplo n.º 6
0
        public ModelBinderCache(IEnumerable<IModelBinder> binders, IPropertyBinderCache propertyBinders, ITypeDescriptorCache types)
        {
            _binders.AddRange(binders);
            _binders.Add(new StandardModelBinder(propertyBinders, types));

            _cache.OnMissing = type => _binders.FirstOrDefault(x => x.Matches(type));
        }
Ejemplo n.º 7
0
        public UniqueValidationSource(ITransactionProcessor transactionProcessor, ITypeDescriptorCache descriptors)
        {
            _transactionProcessor = transactionProcessor;
            _descriptors = descriptors;

            _rules = new Cache<Type, IEnumerable<IValidationRule>>(DetermineRulesFor);
        }
Ejemplo n.º 8
0
        public UniqueValidationSource(ITransactionProcessor transactionProcessor, ITypeDescriptorCache descriptors)
        {
            _transactionProcessor = transactionProcessor;
            _descriptors          = descriptors;

            _rules = new Cache <Type, IEnumerable <IValidationRule> >(DetermineRulesFor);
        }
Ejemplo n.º 9
0
        public ModelBinderCache(IEnumerable<IModelBinder> binders, IPropertyBinderCache propertyBinders, ITypeDescriptorCache types)
        {
            // DO NOT put the standard model binder at top
            _binders.AddRange(binders.Where(x => !(x is StandardModelBinder)));
            _binders.Add(new StandardModelBinder(propertyBinders, types));

            _cache.OnMissing = type => _binders.FirstOrDefault(x => x.Matches(type));
        }
Ejemplo n.º 10
0
 public RemoteRuleGraphActivator(ValidationGraph graph, RemoteRuleGraph remoteGraph, BehaviorGraph behaviorGraph, IRemoteRuleQuery remotes, ITypeDescriptorCache properties)
 {
     _graph = graph;
     _remoteGraph = remoteGraph;
     _behaviorGraph = behaviorGraph;
     _remotes = remotes;
     _properties = properties;
 }
Ejemplo n.º 11
0
        public ModelBinderCache(IEnumerable<IModelBinder> binders, IPropertyBinderCache propertyBinders, ITypeDescriptorCache types)
        {
            _binders.AddRange(binders);
            _binders.Add(new StandardModelBinder(propertyBinders, types));

            // TODO -- specific message if model binder cannot be found
            _cache.OnMissing = type => _binders.First(x => x.Matches(type));
        }
Ejemplo n.º 12
0
 public RemoteRuleGraphActivator(ValidationGraph graph, RemoteRuleGraph remoteGraph, BehaviorGraph behaviorGraph, IRemoteRuleQuery remotes, ITypeDescriptorCache properties)
 {
     _graph         = graph;
     _remoteGraph   = remoteGraph;
     _behaviorGraph = behaviorGraph;
     _remotes       = remotes;
     _properties    = properties;
 }
Ejemplo n.º 13
0
        public FieldRulesRegistry(IEnumerable <IFieldValidationSource> sources, ITypeDescriptorCache properties)
        {
            _sources.Fill(new AttributeFieldValidationSource());
            _sources.Fill(sources);

            _properties          = properties;
            _typeRules.OnMissing = findRules;
        }
Ejemplo n.º 14
0
        public FieldRulesRegistry(IEnumerable <IFieldValidationSource> sources, ITypeDescriptorCache typeDescriptors)
        {
            _sources = new List <IFieldValidationSource>(sources)
            {
                new AttributeFieldValidationSource()
            };

            _typeDescriptors     = typeDescriptors;
            _typeRules.OnMissing = findRules;
        }
Ejemplo n.º 15
0
        public ModelQueryService(ISchemaCache schema, ISchemaMetadataCache metadata, ITypeDescriptorCache typeDescriptor, IServiceLocator services, IModelMapRegistry models)
        {
            _schema         = schema;
            _metadata       = metadata;
            _typeDescriptor = typeDescriptor;
            _services       = services;
            _models         = models;

            _results = new Cache <Type, ModelQueryResult>(query);
        }
Ejemplo n.º 16
0
 public TypeGraphFactory(
     Configuration configuration,
     ITypeDescriptorCache typeCache,
     IDescriptionConvention <Type, TypeDescription> typeConvention,
     IDescriptionConvention <PropertyInfo, MemberDescription> memberConvention,
     OptionFactory optionFactory)
 {
     _configuration    = configuration;
     _typeCache        = typeCache;
     _memberConvention = memberConvention;
     _optionFactory    = optionFactory;
     _typeConvention   = typeConvention;
 }
Ejemplo n.º 17
0
 public TypeGraphFactory(
     Configuration configuration, 
     ITypeDescriptorCache typeCache,
     IDescriptionConvention<Type, TypeDescription> typeConvention,
     IDescriptionConvention<PropertyInfo, MemberDescription> memberConvention,
     OptionFactory optionFactory)
 {
     _configuration = configuration;
     _typeCache = typeCache;
     _memberConvention = memberConvention;
     _optionFactory = optionFactory;
     _typeConvention = typeConvention;
 }
 public ModelBinderCache(IEnumerable <IModelBinder> binders, IPropertyBinderCache propertyBinders, ITypeDescriptorCache types)
     : this()
 {
     // DO NOT put the standard model binder at top
     _binders.AddRange(binders.Where(x => !(x is StandardModelBinder)));
     _binders.Add(new StandardModelBinder(propertyBinders, types));
 }
Ejemplo n.º 19
0
        public ModelBinderCache(IEnumerable <IModelBinder> binders, IPropertyBinderCache propertyBinders, ITypeDescriptorCache types)
        {
            // DO NOT put the standard model binder at top
            _binders.AddRange(binders.Where(x => !(x is StandardModelBinder)));
            _binders.Add(new StandardModelBinder(propertyBinders, types));

            _cache.OnMissing = type => _binders.FirstOrDefault(x => x.Matches(type));
        }
Ejemplo n.º 20
0
 public DirectiveWriter(IFlatFileWriter writer, ITypeDescriptorCache types)
 {
     _writer = writer;
     _types = types;
 }
 public StandardModelBinder(BindingRegistry propertyBinders, ITypeDescriptorCache typeCache)
 {
     _propertyBinders = propertyBinders;
     _typeCache = typeCache;
 }
Ejemplo n.º 22
0
 public StandardModelBinder(BindingRegistry propertyBinders, ITypeDescriptorCache typeCache)
 {
     _propertyBinders = propertyBinders;
     _typeCache       = typeCache;
 }
Ejemplo n.º 23
0
 public HostWriter(ITypeDescriptorCache types)
 {
     _types = types;
 }
Ejemplo n.º 24
0
 public HostWriter(ITypeDescriptorCache types)
 {
     _types = types;
 }
Ejemplo n.º 25
0
 public ActionCallMapper(ITypeDescriptorCache typeCache)
 {
     _typeCache = typeCache;
 }
Ejemplo n.º 26
0
 public FubuTupleBinder(ITypeDescriptorCache types)
 {
     _types = types;
 }
Ejemplo n.º 27
0
 private FieldRulesRegistry(ITypeDescriptorCache properties)
 {
     _properties          = properties;
     _typeRules.OnMissing = findRules;
 }
Ejemplo n.º 28
0
 public DirectiveWriter(IFlatFileWriter writer, ITypeDescriptorCache types)
 {
     _writer = writer;
     _types  = types;
 }
Ejemplo n.º 29
0
 public StandardModelBinder(IPropertyBinderCache propertyBinders, ITypeDescriptorCache typeCache)
 {
     _propertyBinders = propertyBinders;
     _typeCache       = typeCache;
 }
Ejemplo n.º 30
0
 public ActionCallMapper(ITypeDescriptorCache typeCache)
 {
     _typeCache = typeCache;
 }
Ejemplo n.º 31
0
 public StandardModelBinder(IPropertyBinderCache propertyBinders, ITypeDescriptorCache typeCache)
 {
     _propertyBinders = propertyBinders;
     _typeCache = typeCache;
 }
Ejemplo n.º 32
0
 public FubuTupleBinder(ITypeDescriptorCache types)
 {
     _types = types;
 }