HandCoded.Meta.SchemaRelease.AddImport C# (CSharp) Method

AddImport() public method

Creates a bi-directional reference between this SchemaRelease and the meta data for other instance that it imports.
public AddImport ( SchemaRelease release ) : void
release SchemaRelease The imported .
return void
        public void AddImport(SchemaRelease release)
        {
            this.imports.Add (release);
            release.importedBy.Add (this);
        }

Usage Example

 /// <summary>
 /// Connects this schema to any other schemas that it imports.
 /// </summary>
 /// <param name="release">The <see cref="SchemaRelease"/> for this schema.</param>
 /// <param name="context">The context <see cref="XmlElement"/> for the section.</param>
 /// <param name="loadedSchemas">A dictionay of previous bootstrapped schemas.</param>
 protected void HandleImports(SchemaRelease release, XmlElement context, Dictionary <string, SchemaRelease> loadedSchemas)
 {
     foreach (XmlElement node in XPath.Paths(context, "import"))
     {
         XmlAttribute href = node.GetAttributeNode("href");
         if (href != null)
         {
             release.AddImport((SchemaRelease)loadedSchemas [href.Value]);
         }
     }
 }
All Usage Examples Of HandCoded.Meta.SchemaRelease::AddImport