private void AddInternal(UITransform transform) { _transforms.Add(transform); lock (transform.SyncRoot) { transform.SetContainer(this); transform.MarkedDirty += Transform_MarkedDirty; } }
private bool RemoveInternal(UITransform original, UITransform candidate, int i) { lock (original.SyncRoot) { if (original.Container == this) { original.SetContainer(null); } original.MarkedDirty -= Transform_MarkedDirty; } if (candidate.TransformKey == original.TransformKey) { _transforms.RemoveAt(i); return(true); } return(false); }