예제 #1
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);
        }
예제 #2
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);
        }