Exemplo n.º 1
0
        public void OnBeforeSerialize()
        {
            if (this._serializedConditions == null)
            {
                this._serializedConditions = new List <string>();
            }
            else
            {
                this._serializedConditions.Clear();
            }

            if (this._conditions == null)
            {
                return;
            }

            foreach (ITransitionCondition condition in this._conditions)
            {
                string serializedCondition = JsonSerialization.SerializeGeneric(condition);
                if (serializedCondition != null)
                {
                    this._serializedConditions.Add(serializedCondition);
                }
            }
        }
Exemplo n.º 2
0
        public void OnBeforeSerialize()
        {
            if (this._serializedNodeDelegates == null)
            {
                this._serializedNodeDelegates = new List <string>();
            }
            else
            {
                this._serializedNodeDelegates.Clear();
            }

            if (this._nodeDelegates == null)
            {
                return;
            }

            foreach (INodeDelegate nodeDelegate in this._nodeDelegates)
            {
                string serializedNodeDelegate = JsonSerialization.SerializeGeneric(nodeDelegate);
                if (serializedNodeDelegate != null)
                {
                    this._serializedNodeDelegates.Add(serializedNodeDelegate);
                }
            }
        }