예제 #1
0
            public AppNodeImpl(AppNodeImpl parentAppNode)
            {
                this.discardableImpl_            = parentAppNode.discardableImpl_.CreateChild();
                this.discardableImpl_.OnDiscard += _ => this.Discard_();

                this.listener_ =
                    IEventFactory.INSTANCE.NewListener(this.discardableImpl_);
                this.downwardRelay_ =
                    IEventFactory.INSTANCE.NewRelay(this.discardableImpl_);

                this.SetParent(parentAppNode);

                this.forOnTickMethod_ = new ForOnTickMethodImpl(this);
            }
예제 #2
0
            private void SetParent_(AppNodeImpl parent)
            {
                if (this.IsDiscarded)
                {
                    return;
                }
                // TODO: Check no loops!
                // TODO: Leverage discardableImpl hierarchy??

                // Clean up old parent
                if (this.parent_ != null)
                {
                    this.downwardRelay_.RemoveRelaySource(this.parent_.downwardRelay_);
                }

                // Set new parent
                this.parent_ = parent;
                this.downwardRelay_.AddRelaySource(this.parent_.downwardRelay_);
                this.discardableImpl_.SetParent(this.parent_.discardableImpl_);
            }
예제 #3
0
 public ForOnTickMethodImpl(AppNodeImpl parent)
 {
     this.parent_ = parent;
 }