public void AddParameter(String parameterName, Object value) { LocalRestCallParameter parameter = new LocalRestCallParameter(); parameter.Parameter = parameterName; parameter.Value = value; this.Parameters.Add(parameter); }
public IRestCallSerializable Deserialize(IDictionary <string, object> dictionary) { LocalRestCallModel result = new LocalRestCallModel(this.Provider); foreach (string key in dictionary.Keys) { switch (key) { case "Container": result.Container = dictionary[key].ToString(); break; case "MethodName": result.MethodName = dictionary[key].ToString(); break; case "ModelName": result.ModelName = dictionary[key].ToString(); break; case "Parameters": if (dictionary[key] is System.Collections.ArrayList) { foreach (object parameter in dictionary[key] as System.Collections.ArrayList) { if (parameter is IDictionary <string, object> ) { IDictionary <string, object> dparam = parameter as IDictionary <string, object>; LocalRestCallParameter iparam = new LocalRestCallParameter(); result.Parameters.Add(iparam); foreach (string pkey in dparam.Keys) { switch (pkey) { case "Parameter": iparam.Parameter = dparam[pkey].ToString(); break; case "Value": iparam.Value = dparam[pkey]; break; } } } } } break; } } return(result); }