internal static IDisposable GetLocker(IObjectStateCycle Lockable, IImportContext Context ) { if ((Lockable as IObjectState).State == ObjectState.Removed) return null; return new Locker(Lockable, Context); }
private Locker(IObjectStateCycle Lockable, IImportContext iContext) { _Locked = Lockable; Lockable.SetInternalState(ObjectState.UnderEdit,null); _Locked.ObjectStateChanges += Listener; _Context = iContext; }