Ejemplo n.º 1
0
 public static IList <EdmSchemaError> ParseAndValidate(
     IEnumerable <XmlReader> xmlReaders,
     IEnumerable <string> sourceFilePaths,
     SchemaDataModelOption dataModel,
     DbProviderManifest providerManifest,
     out IList <Schema> schemaCollection)
 {
     return(SchemaManager.ParseAndValidate(xmlReaders, sourceFilePaths, dataModel, new AttributeValueNotification(SchemaManager.NoOpAttributeValueNotification), new AttributeValueNotification(SchemaManager.NoOpAttributeValueNotification), (ProviderManifestNeeded)(error => providerManifest ?? (DbProviderManifest)MetadataItem.EdmProviderManifest), out schemaCollection));
 }
Ejemplo n.º 2
0
        public static IList <EdmSchemaError> LoadProviderManifest(
            XmlReader xmlReader,
            string location,
            bool checkForSystemNamespace,
            out Schema schema)
        {
            IList <Schema>         schemaCollection = (IList <Schema>) new List <Schema>(1);
            DbProviderManifest     providerManifest = checkForSystemNamespace ? (DbProviderManifest)EdmProviderManifest.Instance : (DbProviderManifest)null;
            IList <EdmSchemaError> andValidate      = SchemaManager.ParseAndValidate((IEnumerable <XmlReader>) new XmlReader[1]
            {
                xmlReader
            }, (IEnumerable <string>) new string[1]
            {
                location
            }, SchemaDataModelOption.ProviderManifestModel, providerManifest, out schemaCollection);

            schema = schemaCollection.Count == 0 ? (Schema)null : schemaCollection[0];
            return(andValidate);
        }