Table of Contents

Class ByteDanceMicroAppClientEventExtensions

Namespace
SKIT.FlurlHttpClient.ByteDance.MicroApp
Assembly
DH.SKIT.FlurlHttpClient.ByteDance.MicroApp.dll

ByteDanceMicroAppClient 提供回调通知事件的扩展方法。

public static class ByteDanceMicroAppClientEventExtensions
Inheritance
ByteDanceMicroAppClientEventExtensions
Inherited Members

Methods

DeserializeEventFromJson(ByteDanceMicroAppClient, string)

从 JSON 反序列化得到 ByteDanceMicroAppEvent 对象。

public static ByteDanceMicroAppEvent DeserializeEventFromJson(this ByteDanceMicroAppClient client, string callbackJson)

Parameters

client ByteDanceMicroAppClient
callbackJson string

Returns

ByteDanceMicroAppEvent

DeserializeEventFromJson<TEvent>(ByteDanceMicroAppClient, string)

从 JSON 反序列化得到 ByteDanceMicroAppEvent 对象。

public static TEvent DeserializeEventFromJson<TEvent>(this ByteDanceMicroAppClient client, string callbackJson) where TEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IJsonSerializable, new()

Parameters

client ByteDanceMicroAppClient
callbackJson string

Returns

TEvent

Type Parameters

TEvent

DeserializeEventFromXml(ByteDanceMicroAppClient, string)

从 XML 反序列化得到 ByteDanceMicroAppEvent 对象。

public static ByteDanceMicroAppEvent DeserializeEventFromXml(this ByteDanceMicroAppClient client, string callbackXml)

Parameters

client ByteDanceMicroAppClient
callbackXml string

Returns

ByteDanceMicroAppEvent

DeserializeEventFromXml<TEvent>(ByteDanceMicroAppClient, string)

从 XML 反序列化得到 ByteDanceMicroAppEvent 对象。

public static TEvent DeserializeEventFromXml<TEvent>(this ByteDanceMicroAppClient client, string callbackXml) where TEvent : ByteDanceMicroAppEvent, ByteDanceMicroAppEvent.Serialization.IXmlSerializable, new()

Parameters

client ByteDanceMicroAppClient
callbackXml string

Returns

TEvent

Type Parameters

TEvent

VerifyEventSignatureForEcho(ByteDanceMicroAppClient, string, string, string, string)

验证回调通知事件签名。

REF: https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/message-push-customer-service

public static bool VerifyEventSignatureForEcho(this ByteDanceMicroAppClient client, string callbackTimestamp, string callbackNonce, string callbackMessage, string callbackSignature)

Parameters

client ByteDanceMicroAppClient
callbackTimestamp string

头条回调通知中的 "timestamp" 查询参数。

callbackNonce string

头条回调通知中的 "nonce" 查询参数。

callbackMessage string

头条回调通知中的 "msg" 查询参数。

callbackSignature string

头条回调通知中的 "signature" 查询参数。

Returns

bool

VerifyEventSignatureFromJson(ByteDanceMicroAppClient, string)

验证回调通知事件签名。

REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption

public static bool VerifyEventSignatureFromJson(this ByteDanceMicroAppClient client, string callbackJson)

Parameters

client ByteDanceMicroAppClient
callbackJson string

Returns

bool

VerifyEventSignatureFromXml(ByteDanceMicroAppClient, string)

验证回调通知事件签名。

REF: https://developer.open-douyin.com/docs/resource/zh-CN/thirdparty/overview-guide/smallprogram/encryption

public static bool VerifyEventSignatureFromXml(this ByteDanceMicroAppClient client, string callbackXml)

Parameters

client ByteDanceMicroAppClient
callbackXml string

Returns

bool