public StorageMappingItemCollection(EdmItemCollection edmCollection, StoreItemCollection storeCollection,
                                            params string[] filePaths)
            : base(DataSpace.CSSpace)
        {
            EntityUtil.CheckArgumentNull(edmCollection, "edmCollection");
            EntityUtil.CheckArgumentNull(storeCollection, "storeCollection");
            EntityUtil.CheckArgumentNull(filePaths, "filePaths");

            this.m_edmCollection       = edmCollection;
            this.m_storeItemCollection = storeCollection;

            // Wrap the file paths in instances of the MetadataArtifactLoader class, which provides
            // an abstraction and a uniform interface over a diverse set of metadata artifacts.
            //
            MetadataArtifactLoader composite = null;
            List <XmlReader>       readers   = null;

            try
            {
                composite = MetadataArtifactLoader.CreateCompositeFromFilePaths(filePaths, XmlConstants.CSSpaceSchemaExtension);
                readers   = composite.CreateReaders(DataSpace.CSSpace);

                this.Init(edmCollection, storeCollection, readers,
                          composite.GetPaths(DataSpace.CSSpace), true /*throwOnError*/);
            }
            finally
            {
                if (readers != null)
                {
                    Helper.DisposeXmlReaders(readers);
                }
            }
        }
        public StorageMappingItemCollection(EdmItemCollection edmCollection,
                                            StoreItemCollection storeCollection,
                                            IEnumerable <XmlReader> xmlReaders)
            : base(DataSpace.CSSpace)
        {
            EntityUtil.CheckArgumentNull(xmlReaders, "xmlReaders");

            MetadataArtifactLoader composite = MetadataArtifactLoader.CreateCompositeFromXmlReaders(xmlReaders);

            this.Init(edmCollection,
                      storeCollection,
                      composite.GetReaders(),   // filter out duplicates
                      composite.GetPaths(),
                      true /* throwOnError*/);
        }