Example #1
0
        private void FixupLatch2(LatchDto previousValue)
        {
            if (previousValue != null && previousValue.Latch1.Contains(this))
            {
                previousValue.Latch1.Remove(this);
            }

            if (Latch2 != null)
            {
                if (!Latch2.Latch1.Contains(this))
                {
                    Latch2.Latch1.Add(this);
                }
                if (LatchParent != Latch2.Id)
                {
                    LatchParent = Latch2.Id;
                }
            }
        }
Example #2
0
        private void FixupLatch(LatchDto previousValue)
        {
            if (previousValue != null && previousValue.KeyAccesses.Contains(this))
            {
                previousValue.KeyAccesses.Remove(this);
            }

            if (Latch != null)
            {
                if (!Latch.KeyAccesses.Contains(this))
                {
                    Latch.KeyAccesses.Add(this);
                }
                if (LatchId != Latch.Id)
                {
                    LatchId = Latch.Id;
                }
            }
        }