You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SOP/sop-sdk/sdk-csharp/SDKCSharp/Common/DefaultDataNameBuilder.cs

21 lines
592 B

using System;
namespace SDKCSharp.Common
{
/// <summary>
/// 将方法名中的"."转成"_"并在后面追加"_response"。
/// 如:alipay.trade.order.settle --> alipay_trade_order_settle_response。
/// </summary>
public class DefaultDataNameBuilder : DataNameBuilder
{
private const char DOT = '.';
private const char UNDERLINE = '_';
5 years ago
private const string DATA_SUFFIX = SopSdkConstants.DATA_SUFFIX;
public string Build(string method)
{
return method.Replace(DOT, UNDERLINE) + DATA_SUFFIX;
}
}
}