Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Data.Entity.Core.Metadata.Edm.StoreItemCollection" /> class using the specified XMLReader.
        /// </summary>
        /// <param name="xmlReaders">The XMLReader used to create metadata.</param>
        public StoreItemCollection(IEnumerable <XmlReader> xmlReaders)
            : base(DataSpace.SSpace)
        {
            Check.NotNull <IEnumerable <XmlReader> >(xmlReaders, nameof(xmlReaders));
            EntityUtil.CheckArgumentEmpty <XmlReader>(ref xmlReaders, new Func <string, string>(Strings.StoreItemCollectionMustHaveOneArtifact), "xmlReader");
            MetadataArtifactLoader compositeFromXmlReaders = MetadataArtifactLoader.CreateCompositeFromXmlReaders(xmlReaders);

            this.Init((IEnumerable <XmlReader>)compositeFromXmlReaders.GetReaders(), (IEnumerable <string>)compositeFromXmlReaders.GetPaths(), true, (IDbDependencyResolver)null, out this._providerManifest, out this._providerFactory, out this._providerInvariantName, out this._providerManifestToken, out this._cachedCTypeFunction);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmItemCollection" /> class by using the collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist.
        /// </summary>
        /// <param name="xmlReaders">The collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist.</param>
        public EdmItemCollection(IEnumerable <XmlReader> xmlReaders)
            : base(DataSpace.CSpace)
        {
            Check.NotNull <IEnumerable <XmlReader> >(xmlReaders, nameof(xmlReaders));
            EntityUtil.CheckArgumentContainsNull <XmlReader>(ref xmlReaders, nameof(xmlReaders));
            MetadataArtifactLoader compositeFromXmlReaders = MetadataArtifactLoader.CreateCompositeFromXmlReaders(xmlReaders);

            this.Init((IEnumerable <XmlReader>)compositeFromXmlReaders.GetReaders(), (IEnumerable <string>)compositeFromXmlReaders.GetPaths(), true);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Data.Entity.Core.Metadata.Edm.EdmItemCollection" /> class by using the collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist.
        /// </summary>
        /// <param name="xmlReaders">The collection of the XMLReader objects where the conceptual schema definition language (CSDL) files exist.</param>
        public EdmItemCollection(IEnumerable <XmlReader> xmlReaders)
            : base(DataSpace.CSpace)
        {
            Check.NotNull(xmlReaders, "xmlReaders");
            EntityUtil.CheckArgumentContainsNull(ref xmlReaders, "xmlReaders");

            var composite = MetadataArtifactLoader.CreateCompositeFromXmlReaders(xmlReaders);

            Init(
                composite.GetReaders(),
                composite.GetPaths(),
                true /*throwOnError*/);
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Public constructor that loads the metadata files from the specified xmlReaders.
        ///     Throws when encounter errors.
        /// </summary>
        /// <param name="xmlReaders"> xmlReaders where the CDM schemas are loaded </param>
        public StoreItemCollection(IEnumerable <XmlReader> xmlReaders)
            : base(DataSpace.SSpace)
        {
            Check.NotNull(xmlReaders, "xmlReaders");
            EntityUtil.CheckArgumentEmpty(ref xmlReaders, Strings.StoreItemCollectionMustHaveOneArtifact, "xmlReader");

            var composite = MetadataArtifactLoader.CreateCompositeFromXmlReaders(xmlReaders);

            Init(
                composite.GetReaders(),
                composite.GetPaths(), true,
                out _providerManifest,
                out _providerFactory,
                out _providerManifestToken,
                out _cachedCTypeFunction);
        }