Exemple #1
0
 private void InitChildrenSiblings(TaxonomyIndexArrays copyFrom)
 {
     lock (this)
     {
         if (!initializedChildren) // must do this check !
         {
             children_Renamed = new int[parents_Renamed.Length];
             siblings_Renamed = new int[parents_Renamed.Length];
             if (copyFrom != null)
             {
                 // called from the ctor, after we know copyFrom has initialized children/siblings
                 Array.Copy(copyFrom.Children(), 0, children_Renamed, 0, copyFrom.Children().Length);
                 Array.Copy(copyFrom.Siblings(), 0, siblings_Renamed, 0, copyFrom.Siblings().Length);
                 ComputeChildrenSiblings(copyFrom.parents_Renamed.Length);
             }
             else
             {
                 ComputeChildrenSiblings(0);
             }
             initializedChildren = true;
         }
     }
 }
 private void InitChildrenSiblings(TaxonomyIndexArrays copyFrom)
 {
     lock (this)
     {
         if (!initializedChildren) // must do this check !
         {
             children_Renamed = new int[parents_Renamed.Length];
             siblings_Renamed = new int[parents_Renamed.Length];
             if (copyFrom != null)
             {
                 // called from the ctor, after we know copyFrom has initialized children/siblings
                 Array.Copy(copyFrom.Children(), 0, children_Renamed, 0, copyFrom.Children().Length);
                 Array.Copy(copyFrom.Siblings(), 0, siblings_Renamed, 0, copyFrom.Siblings().Length);
                 ComputeChildrenSiblings(copyFrom.parents_Renamed.Length);
             }
             else
             {
                 ComputeChildrenSiblings(0);
             }
             initializedChildren = true;
         }
     }
 }