Example #1
0
 /// <summary>
 /// Adds the specified <see cref="Schema"/> to this instance.
 /// </summary>
 /// <param name="schema">The <c>Schema</c> to add to this instance.</param>
 /// <exception cref="System.ArgumentNullException">schema is null.</exception>
 /// <exception cref="System.InvalidOperationException">
 /// schema belongs to another <see cref="Element"/>.
 /// </exception>
 public void AddSchema(Schema schema)
 {
     this.AddChild(schema);
 }
 private void GatherSimpleFieldFields(SimpleField field, Schema schema)
 {
     if ((field.Name != null) && (field.DisplayName != null))
     {
         string name = schema.Name + "/" + field.Name + DisplayNamePostfix;
         _map[name] = field.DisplayName;
     }
 }
 private void PopulateSimpleFieldNameMap(Schema schema)
 {
     foreach (var field in schema.Fields)
     {
         if (field.Name != null)
         {
             string name = field.DisplayName ?? field.Name; // If no display name then use the regular name.
             string value = schema.Name + ":" + name;
             _fieldMap[field.Name] = value;
         }
     }
 }
 public void SetSchema(Schema schema)
 {
     _schema = schema;
     ProcessSchema();
 }