Esempio n. 1
0
        public void Remove(TObject obj, bool raiseEvent)
        {
            var e = new EventToManageObject <TObject>(this, obj, RegistrationCommand.Remove, raiseEvent);

            Engine.ChangesToBeCommited.Enqueue(e);
            Owner.__Unregister(obj);
        }
Esempio n. 2
0
        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);
        }