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.
20 lines
576 B
20 lines
576 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 = '_';
|
|
private const string DATA_SUFFIX = "_response";
|
|
|
|
public string Build(string method)
|
|
{
|
|
return method.Replace(DOT, UNDERLINE) + DATA_SUFFIX;
|
|
}
|
|
}
|
|
}
|
|
|