public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfParameterDescriptor wfParameter = new WfParameterDescriptor();
            //wfParameter.Key = DictionaryHelper.GetValue(dictionary, "key", string.Empty);
            wfParameter.ParameterType = DictionaryHelper.GetValue(dictionary, "parameterType", PropertyDataType.String);
            wfParameter.ParameterName = DictionaryHelper.GetValue(dictionary, "parameterName", string.Empty);
            wfParameter.ControlID = DictionaryHelper.GetValue(dictionary, "controlID", string.Empty);
            wfParameter.ControlPropertyName = DictionaryHelper.GetValue(dictionary, "controlPropertyName", string.Empty);
            wfParameter.AutoCollect = DictionaryHelper.GetValue(dictionary, "autoCollect", true);

            return wfParameter;
        }
Beispiel #2
0
        public override object Deserialize(IDictionary <string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfParameterDescriptor wfParameter = new WfParameterDescriptor();

            //wfParameter.Key = DictionaryHelper.GetValue(dictionary, "key", string.Empty);
            wfParameter.ParameterType       = DictionaryHelper.GetValue(dictionary, "parameterType", PropertyDataType.String);
            wfParameter.ParameterName       = DictionaryHelper.GetValue(dictionary, "parameterName", string.Empty);
            wfParameter.ControlID           = DictionaryHelper.GetValue(dictionary, "controlID", string.Empty);
            wfParameter.ControlPropertyName = DictionaryHelper.GetValue(dictionary, "controlPropertyName", string.Empty);
            wfParameter.AutoCollect         = DictionaryHelper.GetValue(dictionary, "autoCollect", true);

            return(wfParameter);
        }
Beispiel #3
0
        public override IDictionary <string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            IDictionary <string, object> dictionary = new Dictionary <string, object>();

            WfParameterDescriptor wfParameter = (WfParameterDescriptor)obj;

            //DictionaryHelper.AddNonDefaultValue<string, object>(dictionary, "key", wfParameter.Key);
            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "parameterType", wfParameter.ParameterType);
            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "parameterName", wfParameter.ParameterName);
            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "controlID", wfParameter.ControlID);
            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "controlPropertyName", wfParameter.ControlPropertyName);
            DictionaryHelper.AddNonDefaultValue <string, object>(dictionary, "autoCollect", wfParameter.AutoCollect);

            return(dictionary);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     JSONSerializerExecute.RegisterConverter(typeof(WfParameterDescriptorConverter));
     WfParameterDescriptor wfpd=new WfParameterDescriptor();
     this.hiddenWfParameterTemplate.Value = JSONSerializerExecute.Serialize(wfpd);
 }