一款简单易用的基础网络通讯组件库。

DmtpRpcActor 类

DmtpRpcActor 类,继承自 ConcurrentDictionary,并实现 IDmtpRpcActor 接口。 该类用于管理远程过程调用(RPC)的上下文,通过关联任务和超时逻辑来实现。

Definition

命名空间: TouchSocket.Dmtp.Rpc
程序集: TouchSocket.Dmtp (在 TouchSocket.Dmtp.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public class DmtpRpcActor : ConcurrentDictionary<long, DmtpRpcCallContext>, 
	IDmtpRpcActor, IRpcClient, IActor, ITargetRpcClient
Inheritance
Object    ConcurrentDictionaryInt64, DmtpRpcCallContext    DmtpRpcActor
Implements
IActor, IDmtpRpcActor, IRpcClient, ITargetRpcClient

构造函数

DmtpRpcActor 初始化DmtpRpcActor类的实例。

属性

ComparerGets the IEqualityComparerT that is used to determine equality of keys for the dictionary.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
CountGets the number of key/value pairs contained in the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
DmtpActor 包含当前Actor的父容器。
GetInvokeMethod 获取调用的函数
IsEmptyGets a value that indicates whether the ConcurrentDictionaryTKey, TValue is empty.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ItemGets or sets the value associated with the specified key.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
KeysGets a collection containing the keys in the DictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
SerializationSelector 
ValuesGets a collection that contains the values in the DictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)

方法

AddOrUpdate(TKey, TValue, FuncTKey, TValue, TValue)Adds a key/value pair to the ConcurrentDictionaryTKey, TValue if the key does not already exist, or updates a key/value pair in the ConcurrentDictionaryTKey, TValue by using the specified function if the key already exists.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
AddOrUpdate(TKey, FuncTKey, TValue, FuncTKey, TValue, TValue)Uses the specified functions to add a key/value pair to the ConcurrentDictionaryTKey, TValue if the key does not already exist, or to update a key/value pair in the ConcurrentDictionaryTKey, TValue if the key already exists.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
AddOrUpdateTArg(TKey, FuncTKey, TArg, TValue, FuncTKey, TValue, TArg, TValue, TArg)Uses the specified functions and argument to add a key/value pair to the ConcurrentDictionaryTKey, TValue if the key does not already exist, or to update a key/value pair in the ConcurrentDictionaryTKey, TValue if the key already exists.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ClearRemoves all keys and values from the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ContainsKeyDetermines whether the ConcurrentDictionaryTKey, TValue contains the specified key.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
EqualsDetermines whether the specified object is equal to the current object.
(继承自 Object。)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(继承自 Object。)
GetAlternateLookup``1

Gets an instance of a type that may be used to perform operations on a ConcurrentDictionaryTKey, TValue

using a TAlternateKey as a key instead of a TKey.


(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
GetEnumeratorReturns an enumerator that iterates through the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetOrAdd(TKey, TValue)Adds a key/value pair to the ConcurrentDictionaryTKey, TValue if the key does not already exist. Returns the new value, or the existing value if the key exists.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
GetOrAdd(TKey, FuncTKey, TValue)Adds a key/value pair to the ConcurrentDictionaryTKey, TValue by using the specified function if the key does not already exist. Returns the new value, or the existing value if the key exists.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
GetOrAddTArg(TKey, FuncTKey, TArg, TValue, TArg)Adds a key/value pair to the ConcurrentDictionaryTKey, TValue by using the specified function and an argument if the key does not already exist, or returns the existing value if the key exists.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
InputReceivedData 处理收到的消息
InvokeAsync(String, Type, IInvokeOption, Object) 异步调用一个操作。
InvokeAsync(String, String, Type, IInvokeOption, Object) 异步调用远程目标方法。
MemberwiseCloneCreates a shallow copy of the current Object.
(继承自 Object。)
SetProtocolFlags 设置处理协议标识的起始标识。
ToArrayCopies the key and value pairs stored in the ConcurrentDictionaryTKey, TValue to a new array.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ToStringReturns a string that represents the current object.
(继承自 Object。)
TryAddAttempts to add the specified key and value to the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
TryGetAlternateLookup``1 Gets an instance of a type that may be used to perform operations on a ConcurrentDictionaryTKey, TValue using a TAlternateKey as a key instead of a TKey.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
TryGetValueAttempts to get the value associated with the specified key from the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
TryRemove(KeyValuePairTKey, TValue)Removes a key and value from the dictionary.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
TryRemove(TKey, TValue)Attempts to remove and return the value that has the specified key from the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
TryUpdateUpdates the value associated with key to newValue if the existing value with key is equal to comparisonValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)

扩展方法

Invoke 异步调用一个操作。
(由 RpcClientExtension 定义。)
Invoke 异步调用一个操作。
(由 RpcClientExtension 定义。)
InvokeTT 异步调用一个操作。
(由 RpcClientExtension 定义。)
InvokeTT 异步调用远程目标方法。
(由 RpcClientExtension 定义。)
InvokeTAsyncT 异步调用一个操作。
(由 RpcClientExtension 定义。)
InvokeTAsyncT 异步调用远程目标方法。
(由 RpcClientExtension 定义。)
Map
(由 Mapper 定义。)
Map
(由 Mapper 定义。)
MapTTarget
(由 Mapper 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

显式接口实现

ICollectionKeyValuePairTKey, TValueAddAdds an item to the collection.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryTKey, TValueAddAdds the specified key and value to the IDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryAddAdds the specified key and value to the dictionary.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionKeyValuePairTKey, TValueContainsGets whether the ICollectionT contains an element with the specified key.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryContainsGets a value that indicates the IDictionaryTKey, TValue contains an element with the specified key.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionKeyValuePairTKey, TValueCopyToCopies the elements of the ICollection to an array, starting at the specified array index.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionCopyToCopies the elements of the ICollection to an array, starting at the specified array index.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryGetEnumeratorProvides a IDictionaryEnumerator for the IDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IEnumerableGetEnumeratorReturns an enumerator that iterates through the ConcurrentDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryIsFixedSizeGets a value that indicates whether the IDictionaryTKey, TValue has a fixed size.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionKeyValuePairTKey, TValueIsReadOnlyGets a value that indicates whether the ICollection is read-only.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryIsReadOnlyGets a value that indicates whether the IDictionaryTKey, TValue is read-only.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionIsSynchronizedGets a value that indicates whether access to the ICollection is synchronized with the SyncRoot.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryItemGets or sets the value associated with the specified key.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IReadOnlyDictionaryTKey, TValueKeysGets a collection containing the keys in the DictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryKeysGets an ICollection that contains the keys of the IDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionKeyValuePairTKey, TValueRemoveRemoves the specified key/value pair from the collection.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryTKey, TValueRemoveRemoves the element with the specified key from the IDictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryRemoveRemoves the element with the specified key from the IDictionary.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
ICollectionSyncRootGets an object that can be used to synchronize access to the ICollection. This property is not supported.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IReadOnlyDictionaryTKey, TValueValuesGets a collection that contains the values in the DictionaryTKey, TValue.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)
IDictionaryValuesGets an ICollection that contains the values in the IDictionary.
(继承自 ConcurrentDictionaryInt64, DmtpRpcCallContext。)

参见