public void Remove(TObject obj, bool raiseEvent) { var e = new EventToManageObject <TObject>(this, obj, RegistrationCommand.Remove, raiseEvent); Engine.ChangesToBeCommited.Enqueue(e); Owner.__Unregister(obj); }
public void Add(TObject obj) { if (obj == null) { Particular.Helper.ThrowException("ArgumentNullException(Content)"); } if (obj.IsRegisteredToLayer) { Particular.Helper.ThrowException("指定したオブジェクトは既に別のレイヤーに所属しています。"); } var e = new EventToManageObject <TObject>(this, obj, RegistrationCommand.Add, true); Engine.ChangesToBeCommited.Enqueue(e); Owner.__Register(obj); }