C# Class Senparc.Weixin.MessageQueue.SenparcMessageQueue

消息列队
Exibir arquivo Open project: JeffreySu/WeiXinMPSDK Class Usage Examples

Public Methods

Method Description
Add ( string key, System.Action action ) : SenparcMessageQueueItem

添加列队成员

GenerateKey ( string name, Type senderType, string identityKey, string actionName ) : string

生成Key

GetCount ( ) : int

获得当前列队数量

GetCurrentKey ( ) : string

获取当前等待执行的Key

GetItem ( string key ) : SenparcMessageQueueItem

获取SenparcMessageQueueItem

OperateQueue ( ) : void

操作列队

Remove ( string key ) : void

移除列队成员

Method Details

Add() public method

添加列队成员
public Add ( string key, System.Action action ) : SenparcMessageQueueItem
key string
action System.Action
return SenparcMessageQueueItem

GenerateKey() public static method

生成Key
public static GenerateKey ( string name, Type senderType, string identityKey, string actionName ) : string
name string 列队应用名称,如“ContainerBag”
senderType System.Type 操作对象类型
identityKey string 对象唯一标识Key
actionName string 操作名称,如“UpdateContainerBag”
return string

GetCount() public method

获得当前列队数量
public GetCount ( ) : int
return int

GetCurrentKey() public method

获取当前等待执行的Key
public GetCurrentKey ( ) : string
return string

GetItem() public method

获取SenparcMessageQueueItem
public GetItem ( string key ) : SenparcMessageQueueItem
key string
return SenparcMessageQueueItem

OperateQueue() public static method

操作列队
public static OperateQueue ( ) : void
return void

Remove() public method

移除列队成员
public Remove ( string key ) : void
key string
return void