示例#1
0
 /// <summary>
 /// Gets the GffField derived object for the given schema.  It will check
 /// the top level structure for the field, if it is not found then it will
 /// create it and add it to the top level structure.
 /// </summary>
 /// <param name="schema">The field's schema</param>
 /// <returns>The GffField derived object for the field.</returns>
 protected GffField GetField(GffFieldSchema schema)
 {
     return GetField(schema, topLevel);
 }
示例#2
0
        /// <summary>
        /// Gets the GffField derived object for the given schema.  It will check
        /// the passed field dictionary for the field, if it is not found then it will
        /// create it and add it to the dictionary.
        /// </summary>
        /// <param name="schema">The field's schema</param>
        /// <param name="dict">The field dictionary to check</param>
        /// <returns>The GffField derived object for the field.</returns>
        protected GffField GetField(GffFieldSchema schema, GffFieldDictionary dict)
        {
            // Look up the field for the label.  If we cannot look it up then
            // it has not been added to the module info file, we need to add
            // it ourselves.
            GffField field = dict[schema.Tag];
            if (null == field)
            {
                field = schema.CreateField();
                dict.Add(schema.Tag, field);
            }

            return field;
        }
示例#3
0
 /// <summary>
 /// Adds a field schema to the dictionary.
 /// </summary>
 /// <param name="field">The field's schema</param>
 public void Add(GffFieldSchema field)
 {
     // Add the entry to the hashtable in the dictionary, then
     // add it to the end of our ordered entries collection.  The
     // ordered entries collectoin will allow us to traverse the
     // dictionary in the order that the entries were added, preserving
     // this order.
     InnerHashtable.Add(field.UIName, field);
     orderedEntries.Add(field);
 }