Ejemplo n.º 1
0
        public EntryPointDescriptionController(
            Url entryPoint,
            IEntityContextProvider entityContextProvider,
            IApiEntryPointDescriptionBuilder apiDescriptionBuilder,
            INamedGraphSelectorFactory namedGraphSelectorFactory) :
            base(entityContextProvider, apiDescriptionBuilder, namedGraphSelectorFactory)
        {
            if (entryPoint == null)
            {
                throw new ArgumentNullException("entryPoint");
            }

            (_apiDescriptionBuilder = apiDescriptionBuilder).EntryPoint = entryPoint;
        }
        public EntryPointDescriptionController(
            Url entryPoint,
            IEntityContextProvider entityContextProvider,
            IApiEntryPointDescriptionBuilder apiDescriptionBuilder,
            INamedGraphSelectorFactory namedGraphSelectorFactory) :
            base(entityContextProvider, apiDescriptionBuilder, namedGraphSelectorFactory)
        {
            if (entryPoint == null)
            {
                throw new ArgumentNullException("entryPoint");
            }

            (_apiDescriptionBuilder = apiDescriptionBuilder).EntryPoint = entryPoint;
        }
Ejemplo n.º 3
0
        public CollectionModelTransformer(IEntityContextProvider entityContextProvider, INamedGraphSelectorFactory namedGraphSelectorFactory)
        {
            if (entityContextProvider == null)
            {
                throw new ArgumentNullException("entityContextProvider");
            }

            if (namedGraphSelectorFactory == null)
            {
                throw new ArgumentNullException("namedGraphSelectorFactory");
            }

            _entityContextProvider = entityContextProvider;
            _namedGraphSelectorFactory = namedGraphSelectorFactory;
        }
Ejemplo n.º 4
0
        public CollectionModelTransformer(IEntityContextProvider entityContextProvider, INamedGraphSelectorFactory namedGraphSelectorFactory)
        {
            if (entityContextProvider == null)
            {
                throw new ArgumentNullException("entityContextProvider");
            }

            if (namedGraphSelectorFactory == null)
            {
                throw new ArgumentNullException("namedGraphSelectorFactory");
            }

            _entityContextProvider     = entityContextProvider;
            _namedGraphSelectorFactory = namedGraphSelectorFactory;
        }
Ejemplo n.º 5
0
        /// <summary>Initializes a new instance of the <see cref="DescriptionController" /> class.</summary>
        /// <param name="entityContextProvider">Entity context provider.</param>
        /// <param name="apiDescriptionBuilder">API description builder.</param>
        /// <param name="namedGraphSelectorFactory">Named graph selector factory.</param>
        protected DescriptionController(IEntityContextProvider entityContextProvider, IApiDescriptionBuilder apiDescriptionBuilder, INamedGraphSelectorFactory namedGraphSelectorFactory)
        {
            if (entityContextProvider == null)
            {
                throw new ArgumentNullException("entityContextProvider");
            }

            if (apiDescriptionBuilder == null)
            {
                throw new ArgumentNullException("apiDescriptionBuilder");
            }

            if (namedGraphSelectorFactory == null)
            {
                throw new ArgumentNullException("namedGraphSelectorFactory");
            }

            _entityContextProvider     = entityContextProvider;
            _apiDescriptionBuilder     = apiDescriptionBuilder;
            _namedGraphSelectorFactory = namedGraphSelectorFactory;
        }
Ejemplo n.º 6
0
        /// <summary>Initializes a new instance of the <see cref="ApiDescriptionBuilder" /> class.</summary>
        /// <param name="descriptionBuilder">Description builder.</param>
        /// <param name="xmlDocProvider">The XML documentation provider.</param>
        /// <param name="typeDescriptionBuilders">Type description builders.</param>
        /// <param name="serverBehaviorAttributeVisitors">Server behavior attribute visitors.</param>
        /// <param name="namedGraphSelectorFactory">Named graph selector factory.</param>
        protected ApiDescriptionBuilder(
            IHttpControllerDescriptionBuilder descriptionBuilder,
            IXmlDocProvider xmlDocProvider,
            IEnumerable<ITypeDescriptionBuilder> typeDescriptionBuilders,
            IEnumerable<IServerBehaviorAttributeVisitor> serverBehaviorAttributeVisitors,
            INamedGraphSelectorFactory namedGraphSelectorFactory)
        {
            if (descriptionBuilder == null)
            {
                throw new ArgumentNullException("descriptionBuilder");
            }

            if (xmlDocProvider == null)
            {
                throw new ArgumentNullException("xmlDocProvider");
            }

            if (typeDescriptionBuilders == null)
            {
                throw new ArgumentNullException("typeDescriptionBuilders");
            }

            if (!typeDescriptionBuilders.Any())
            {
                throw new ArgumentOutOfRangeException("typeDescriptionBuilders");
            }

            if (namedGraphSelectorFactory == null)
            {
                throw new ArgumentNullException("namedGraphSelectorFactory");
            }

            _descriptionBuilder = descriptionBuilder;
            _xmlDocProvider = xmlDocProvider;
            _typeDescriptionBuilders = typeDescriptionBuilders;
            _serverBehaviorAttributeVisitors = serverBehaviorAttributeVisitors ?? new IServerBehaviorAttributeVisitor[0];
            _namedGraphSelectorFactory = namedGraphSelectorFactory;
        }
Ejemplo n.º 7
0
        /// <summary>Initializes a new instance of the <see cref="ApiDescriptionBuilder" /> class.</summary>
        /// <param name="descriptionBuilder">Description builder.</param>
        /// <param name="xmlDocProvider">The XML documentation provider.</param>
        /// <param name="typeDescriptionBuilders">Type description builders.</param>
        /// <param name="serverBehaviorAttributeVisitors">Server behavior attribute visitors.</param>
        /// <param name="namedGraphSelectorFactory">Named graph selector factory.</param>
        protected ApiDescriptionBuilder(
            IHttpControllerDescriptionBuilder descriptionBuilder,
            IXmlDocProvider xmlDocProvider,
            IEnumerable <ITypeDescriptionBuilder> typeDescriptionBuilders,
            IEnumerable <IServerBehaviorAttributeVisitor> serverBehaviorAttributeVisitors,
            INamedGraphSelectorFactory namedGraphSelectorFactory)
        {
            if (descriptionBuilder == null)
            {
                throw new ArgumentNullException("descriptionBuilder");
            }

            if (xmlDocProvider == null)
            {
                throw new ArgumentNullException("xmlDocProvider");
            }

            if (typeDescriptionBuilders == null)
            {
                throw new ArgumentNullException("typeDescriptionBuilders");
            }

            if (!typeDescriptionBuilders.Any())
            {
                throw new ArgumentOutOfRangeException("typeDescriptionBuilders");
            }

            if (namedGraphSelectorFactory == null)
            {
                throw new ArgumentNullException("namedGraphSelectorFactory");
            }

            _descriptionBuilder              = descriptionBuilder;
            _xmlDocProvider                  = xmlDocProvider;
            _typeDescriptionBuilders         = typeDescriptionBuilders;
            _serverBehaviorAttributeVisitors = serverBehaviorAttributeVisitors ?? new IServerBehaviorAttributeVisitor[0];
            _namedGraphSelectorFactory       = namedGraphSelectorFactory;
        }