本文整理汇总了C#中QueryParameters.ToUrlFormattedString方法的典型用法代码示例。如果您正苦于以下问题:C# QueryParameters.ToUrlFormattedString方法的具体用法?C# QueryParameters.ToUrlFormattedString怎么用?C# QueryParameters.ToUrlFormattedString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryParameters
的用法示例。
在下文中一共展示了QueryParameters.ToUrlFormattedString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBanner
/// <summary>
/// Get Banner
/// </summary>
/// <param name="apiContext">APIContext used for the API call.</param>
/// <param name="email">Email</param>
/// <param name="merchantUuid">merchantUuid</param>
/// <returns>Banner Object</returns>
public Banner GetBanner(APIContext apiContext, string email, string merchantUuid = "")
{
// Set Up default value
merchantUuid = merchantUuid.Length == 0 ? apiContext.GetMerchantUuid() : merchantUuid;
// Validate
ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
ArgumentValidator.Validate(email, "email");
ArgumentValidator.Validate(merchantUuid, "merchantUuid");
var queryParameters = new QueryParameters();
queryParameters["email"] = email;
// Configure and send the request
var pattern = "v2/banner/{0}";
var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { merchantUuid }) + queryParameters.ToUrlFormattedString();
return ExpresslyClient.ConfigureAndExecute<Banner>(apiContext, ExpresslyClient.HttpMethod.GET, resourcePath);
}