本文整理汇总了C#中EgoiMap类的典型用法代码示例。如果您正苦于以下问题:C# EgoiMap类的具体用法?C# EgoiMap怎么用?C# EgoiMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EgoiMap类属于命名空间,在下文中一共展示了EgoiMap类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: prepareMapPayload
public static String prepareMapPayload(String prepend, EgoiMap values)
{
StringBuilder q = new StringBuilder();
foreach (String key in values.Keys)
{
Object value = values[key];
String result = null;
String prefix = String.Format("{0}[{1}]", prepend, key);
if (value is EgoiMap)
{
EgoiMap map = (EgoiMap)value;
result = prepareMapPayload(prefix, map);
}
else if (value is EgoiMapList)
{
EgoiMapList list = (EgoiMapList)value;
result = prepareListPayload(prefix, list);
}
else
{
result = String.Format("{0}={1}&", prefix, value.ToString());
}
q.Append(result);
}
return q.ToString();
}
示例2: buildPayload
public String buildPayload(EgoiMap values)
{
if (values != null)
return values.ToString();
return "";
}
示例3: processCall_Click
private void processCall_Click(object sender, EventArgs e)
{
status.Text = "";
output.Clear();
Protocol p = (Protocol) protocol.SelectedItem;
try
{
EgoiApi api = EgoiApiFactory.getApi(p);
EgoiMap arguments = new EgoiMap();
arguments.Add("apikey", apiKey.Text);
EgoiMap result = api.getUserData(arguments);
output.Text = result.ToString();
} catch(EgoiException ex) {
status.Text = ex.Message;
}
}
示例4: buildPayload
public String buildPayload(EgoiMap values)
{
StringBuilder url = new StringBuilder();
int i = 0;
foreach (String key in values.Keys)
{
Object value = values[key];
if (i > 0)
url.Append("&");
if(value is Array)
{
string valueToAppend = string.Empty;
foreach(var val in (Array)value)
{
valueToAppend += val.ToString() + ",";
}
if (!string.IsNullOrEmpty(valueToAppend))
{
valueToAppend = valueToAppend.Trim(',');
url.Append(String.Format("{0}={1}", key, valueToAppend));
}
}
else
{
url.Append(String.Format("{0}={1}", key, value.ToString()));
}
i++;
}
return url.ToString();
}
示例5: getPartnersProducts
///////////////////////////////////////////////////////////////////////////////////////
public string getPartnersProducts(EgoiMap arguments)
{
return processResult("partners/products", "GET", arguments);
}
示例6: checklogin
public EgoiMap checklogin(EgoiMap arguments)
{
return decodeMapResult("checklogin", arguments);
}
示例7: getUserData
public EgoiMap getUserData(EgoiMap arguments)
{
return decodeMapResult("getUserData", arguments);
}
示例8: getSubaccountsProperties
public string getSubaccountsProperties(EgoiMap arguments)
{
return processResult("subaccounts/properties", "GET", arguments);
}
示例9: processResult
public string processResult(string method, string methodType, EgoiMap arguments)
{
string payload = buildPayload(arguments);
string json = fetchResponse(payload, method, methodType);
return json;
}
示例10: subscriberData
public EgoiMap subscriberData(EgoiMap arguments)
{
return decodeMapResult("subscriberData", arguments);
}
示例11: updateList
public EgoiMap updateList(EgoiMap arguments)
{
return decodeMapResult("updateList", arguments);
}
示例12: sendFAX
public EgoiMap sendFAX(EgoiMap arguments)
{
return decodeMapResult("sendFAX", arguments);
}
示例13: sendSMS
public EgoiMap sendSMS(EgoiMap arguments)
{
return decodeMapResult("sendSMS", arguments);
}
示例14: sendEmail
public EgoiMap sendEmail(EgoiMap arguments)
{
return decodeMapResult("sendEmail", arguments);
}
示例15: removeSubscriber
public EgoiMap removeSubscriber(EgoiMap arguments)
{
return decodeMapResult("removeSubscriber", arguments);
}