public override object Deserialize(IDictionary <string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfVariableDescriptor variable = (WfVariableDescriptor)base.Deserialize(dictionary, type, serializer);

            variable.OriginalType  = DictionaryHelper.GetValue(dictionary, "OriginalType", DataType.String);
            variable.OriginalValue = DictionaryHelper.GetValue(dictionary, "OriginalValue", string.Empty);

            return(variable);
        }
        public override IDictionary <string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfVariableDescriptor variable = (WfVariableDescriptor)obj;

            IDictionary <string, object> dictionary = base.Serialize(obj, serializer);

            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "OriginalType", variable.OriginalType);
            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "OriginalValue", variable.OriginalValue);

            return(dictionary);
        }
예제 #3
0
        public WfVariableDescriptor Clone()
        {
            WfVariableDescriptor variable = new WfVariableDescriptor();

            this.CloneProperties(variable);

            variable._OriginalType  = this._OriginalType;
            variable._OriginalValue = this._OriginalValue;

            return(variable);
        }