/// <summary> /// Adds the specified <see cref="SchemaData"/> to this instance. /// </summary> /// <param name="data">The <c>SchemaData</c> to add to this instance.</param> /// <exception cref="System.ArgumentNullException">data is null.</exception> /// <exception cref="System.InvalidOperationException"> /// data belongs to another <see cref="Element"/>. /// </exception> public void AddSchemaData(SchemaData data) { this.AddChild(data); }
private void GatherSchemaDataFields(SchemaData schemaData) { string prefix = "/"; if (schemaData.SchemaUrl != null) { string id = schemaData.SchemaUrl.GetFragment(); if (id != null) // Make sure a fragment was found { Schema schema = _file.FindObject(id) as Schema; if (schema != null) // Make sure it was found and the object is a Schema { foreach (var field in schema.Fields) { this.GatherSimpleFieldFields(field, schema); } this.PopulateSimpleFieldNameMap(schema); prefix = schema.Name + prefix; } } } foreach (var data in schemaData.SimpleData) { this.GatherSimpleDataFields(data, prefix); } }
/// <summary> /// Adds the specified <see cref="SchemaData"/> to this instance. /// </summary> /// <param name="data">The <c>SchemaData</c> to add to this instance.</param> /// <exception cref="System.ArgumentNullException">data is null.</exception> /// <exception cref="System.InvalidOperationException"> /// data belongs to another <see cref="Element"/>. /// </exception> public void AddSchemaData(SchemaData data) { this.AddAsChild(this.schemaDataList, data); }