BcsExplorerDemo.MenuItemVisitor.VisitAgentState C# (CSharp) Method

VisitAgentState() protected method

protected VisitAgentState ( BcsAgentStateNode bcsAgentState ) : void
bcsAgentState BcsAgentStateNode
return void
        protected override void VisitAgentState(BcsAgentStateNode bcsAgentState)
        {
            bool isCurrentState = bcsAgentState.ParentNode != null && (bcsAgentState.ParentNode as BcsAtomicAgentNode).CurrentState.UniqueId == bcsAgentState.UniqueId;

            var item = new MenuItem() { Title = $"State{(isCurrentState ? " - current" : string.Empty)}: {bcsAgentState.Name}" };

            AddToTree(bcsAgentState, item);
        }