public bool CheckForSerialization(bool force, BehaviorSource behaviorSource = null) { bool flag = (behaviorSource == null) ? HasSerialized : behaviorSource.HasSerialized; if (!flag || force) { if (behaviorSource != null) { behaviorSource.HasSerialized = true; } else { this.HasSerialized = true; } if (this.mTaskData != null && !string.IsNullOrEmpty(this.mTaskData.JSONSerialization)) { DeserializeJSON.Load(this.mTaskData, (behaviorSource != null) ? behaviorSource : this); } else { BinaryDeserialization.Load(this.mTaskData, (behaviorSource != null) ? behaviorSource : this); } return(true); } return(false); }
public void CheckForSerialization(bool force) { if (force || this.mVariables == null || (this.mVariables.Count > 0 && this.mVariables[0] == null)) { if (this.VariableData != null && !string.IsNullOrEmpty(this.VariableData.JSONSerialization)) { DeserializeJSON.Load(this.VariableData.JSONSerialization, this); } else { BinaryDeserialization.Load(this); } } }