Composite.C1Console.Trees.ActionNode.Deserialize C# (CSharp) Метод

Deserialize() публичный статический Метод

public static Deserialize ( string>.Dictionary serializedValueCollection, bool removeEntiresFromCollection = false ) : ActionNode
serializedValueCollection string>.Dictionary
removeEntiresFromCollection bool
Результат ActionNode
        public static ActionNode Deserialize(Dictionary<string, string> serializedValueCollection, bool removeEntiresFromCollection = false)
        {
            string treeId = StringConversionServices.DeserializeValueString(serializedValueCollection[TreeIdSerializedKeyName]);
            int actionNodeId = StringConversionServices.DeserializeValueInt(serializedValueCollection[ActionNodeIdSerializedKeyName]);

            if (removeEntiresFromCollection)
            {
                serializedValueCollection.Remove(TreeIdSerializedKeyName);
                serializedValueCollection.Remove(ActionNodeIdSerializedKeyName);
            }

            Tree tree = TreeFacade.GetTree(treeId);

            return tree?.GetActionNode(actionNodeId);
        }

Same methods

ActionNode::Deserialize ( string serializedString ) : ActionNode

Usage Example

Пример #1
0
        public FlowToken Execute(EntityToken entityToken, ActionToken actionToken, FlowControllerServicesContainer flowControllerServicesContainer)
        {
            MessageBoxActionNodeActionToken messageBoxActionNodeActionToken = (MessageBoxActionNodeActionToken)actionToken;

            MessageBoxActionNode messageBoxActionNode = (MessageBoxActionNode)ActionNode.Deserialize(messageBoxActionNodeActionToken.SerializedActionNode);

            IManagementConsoleMessageService managementConsoleMessageService = flowControllerServicesContainer.GetService <IManagementConsoleMessageService>();

            managementConsoleMessageService.ShowMessage(
                messageBoxActionNode.DialogType,
                messageBoxActionNodeActionToken.Title,
                messageBoxActionNodeActionToken.Message);

            return(null);
        }
All Usage Examples Of Composite.C1Console.Trees.ActionNode::Deserialize