Beispiel #1
0
        public override void Delete()
        {
            base.Delete();

            EndTimer();

            if (Encounters != null)
            {
                Encounters.ForEach(e =>
                {
                    e.Reset();
                });

                ColUtility.Free(Encounters);
                Encounters = null;
            }

            if (Addons != null)
            {
                Addons.IterateReverse(addon =>
                {
                    addon.Delete();
                });

                ColUtility.Free(Addons);
                Addons = null;
            }

            if (Instances != null)
            {
                Instances.ForEach(inst =>
                {
                    if (inst.Region != null)
                    {
                        inst.ClearRegion();
                        inst.Region.Unregister();
                    }
                });

                ColUtility.Free(Instances);
                Instances = null;
            }

            if (Queue != null)
            {
                Queue.Clear();
                Queue = null;
            }

            if (Table != null)
            {
                Table.Clear();
                Table = null;
            }

            Instance = null;
        }
Beispiel #2
0
 public HAProxyGroup(HAProxySettings.Group group)
 {
     Settings  = group;
     Instances = group.Instances.Select(i => new HAProxyInstance(i, group)
     {
         Group = this
     }).ToList();
     Instances.ForEach(i => i.TryAddToGlobalPollers());
 }
 internal static void UpdateInstancesFromKeyring()
 {
     Instances.ForEach(t => t.UpdateFromKeyringScopes());
 }
Beispiel #4
0
 /// <summary>
 ///     Resolves the ids.
 /// </summary>
 /// <param name="idMap">The identifier map.</param>
 public void ResolveIds(Dictionary <long, long> idMap)
 {
     RelTypeId.Id = JsonEntityQueryResult.ResolveId(RelTypeId.Id, idMap);
     Instances.ForEach(p => p.ResolveIds(idMap));
 }