예제 #1
0
 /// <summary>
 /// The role of this action is to parent each of the elements so as to enable
 /// reverse-lookups.
 /// <para>Thus far, it appears that the Rechild method is executed when a configuration file
 /// is loaded (such as databaseconfiguration file).</para>
 /// </summary>
 internal static void Rechild(DatabaseElement parent, TableElement child)
 {
     for (int i = 0; i < child.Fields.Count; i++)
     {
         child.Fields[i].Parent = child;
     }
 }
예제 #2
0
 /// <summary>
 /// The role of this action is to parent each of the elements so as to enable
 /// reverse-lookups.
 /// <para>Thus far, it appears that the Rechild method is executed when a configuration file
 /// is loaded (such as databaseconfiguration file).</para>
 /// </summary>
 internal static void Rechild(DatabaseCollection parent, DatabaseElement child)
 {
     child.Children.Clear();
     for (int i = 0; i < child.Items.Count; i++)
     {
         child.Items[i].Parent = child;
         Rechild(child, child.Items[i]);
         child.Children.Add(child.Items[i]);
     }
     for (int i = 0; i < child.Views.Count; i++)
     {
         child.Views[i].Parent = child;
         child.Children.Add(child.Views[i]);
     }
 }