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

Metadata 类

元数据键值对。

Definition

命名空间: TouchSocket.Core
程序集: TouchSocket.Core (在 TouchSocket.Core.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
public class Metadata : Dictionary<string, string>, 
	IPackage
Inheritance
Object    DictionaryString, String    Metadata
Implements
IPackage

构造函数

Metadata初始化 Metadata 类的一个新实例

属性

CapacityGets the total numbers of elements the internal data structure can hold without resizing.
(继承自 DictionaryString, String。)
ComparerGets the IEqualityComparerT that is used to determine equality of keys for the dictionary.
(继承自 DictionaryString, String。)
CountGets the number of key/value pairs contained in the DictionaryTKey, TValue.
(继承自 DictionaryString, String。)
Item 
KeysGets a collection containing the keys in the DictionaryTKey, TValue.
(继承自 DictionaryString, String。)
ValuesGets a collection containing the values in the DictionaryTKey, TValue.
(继承自 DictionaryString, String。)

方法

Add 向元数据集合添加一个键值对。如果键已经存在,则覆盖其值。
ClearRemoves all keys and values from the DictionaryTKey, TValue.
(继承自 DictionaryString, String。)
ContainsKeyDetermines whether the DictionaryTKey, TValue contains the specified key.
(继承自 DictionaryString, String。)
ContainsValueDetermines whether the DictionaryTKey, TValue contains a specific value.
(继承自 DictionaryString, String。)
EnsureCapacityEnsures that the dictionary can hold up to a specified number of entries without any further expansion of its backing storage.
(继承自 DictionaryString, String。)
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``1Gets an instance of a type that can be used to perform operations on the current DictionaryTKey, TValue using a TAlternateKey as a key instead of a TKey.
(继承自 DictionaryString, String。)
GetEnumeratorReturns an enumerator that iterates through the DictionaryTKey, TValue.
(继承自 DictionaryString, String。)
GetHashCodeServes as the default hash function.
(继承自 Object。)
GetTypeGets the Type of the current instance.
(继承自 Object。)
MemberwiseCloneCreates a shallow copy of the current Object.
(继承自 Object。)
OnDeserializationImplements the ISerializable interface and raises the deserialization event when the deserialization is complete.
(继承自 DictionaryString, String。)
PackageTByteBlock 打包。

重写的话,约定基类方法必须先执行

Remove(TKey)Removes the value with the specified key from the DictionaryTKey, TValue.
(继承自 DictionaryString, String。)
Remove(TKey, TValue)Removes the value with the specified key from the DictionaryTKey, TValue, and copies the element to the value parameter.
(继承自 DictionaryString, String。)
ToStringReturns a string that represents the current object.
(继承自 Object。)
TrimExcessSets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries.
(继承自 DictionaryString, String。)
TrimExcess(Int32)Sets the capacity of this dictionary to hold up a specified number of entries without any further expansion of its backing storage.
(继承自 DictionaryString, String。)
TryAddAttempts to add the specified key and value to the dictionary.
(继承自 DictionaryString, String。)
TryGetAlternateLookup``1Gets an instance of a type that can be used to perform operations on the current DictionaryTKey, TValue using a TAlternateKey as a key instead of a TKey.
(继承自 DictionaryString, String。)
TryGetValueGets the value associated with the specified key.
(继承自 DictionaryString, String。)
UnpackageTByteBlock 解包。

重写的话,约定基类方法必须先执行

扩展方法

Map
(由 Mapper 定义。)
Map
(由 Mapper 定义。)
MapTTarget
(由 Mapper 定义。)
ToJsonString 转换为Json
(由 SerializeConvert 定义。)

显式接口实现

ICollectionKeyValuePairTKey, TValueAddAdds the specified value to the ICollectionT with the specified key.
(继承自 DictionaryString, String。)
IDictionaryAddAdds the specified key and value to the dictionary.
(继承自 DictionaryString, String。)
ICollectionKeyValuePairTKey, TValueContainsDetermines whether the ICollectionT contains a specific key and value.
(继承自 DictionaryString, String。)
IDictionaryContainsDetermines whether the IDictionary contains an element with the specified key.
(继承自 DictionaryString, String。)
ICollectionKeyValuePairTKey, TValueCopyToCopies the elements of the ICollectionT to an array of type KeyValuePairTKey, TValue, starting at the specified array index.
(继承自 DictionaryString, String。)
ICollectionCopyToCopies the elements of the ICollectionT to an array, starting at the specified array index.
(继承自 DictionaryString, String。)
IEnumerableKeyValuePairTKey, TValueGetEnumeratorReturns an enumerator that iterates through the collection.
(继承自 DictionaryString, String。)
IDictionaryGetEnumeratorReturns an IDictionaryEnumerator for the IDictionary.
(继承自 DictionaryString, String。)
IEnumerableGetEnumeratorReturns an enumerator that iterates through the collection.
(继承自 DictionaryString, String。)
IDictionaryIsFixedSizeGets a value that indicates whether the IDictionary has a fixed size.
(继承自 DictionaryString, String。)
ICollectionKeyValuePairTKey, TValueIsReadOnlyGets a value that indicates whether the dictionary is read-only.
(继承自 DictionaryString, String。)
IDictionaryIsReadOnlyGets a value that indicates whether the IDictionary is read-only.
(继承自 DictionaryString, String。)
ICollectionIsSynchronizedGets a value that indicates whether access to the ICollection is synchronized (thread safe).
(继承自 DictionaryString, String。)
IDictionaryItemGets or sets the value with the specified key.
(继承自 DictionaryString, String。)
IDictionaryTKey, TValueKeysGets an ICollectionT containing the keys of the IDictionaryTKey, TValue.
(继承自 DictionaryString, String。)
IReadOnlyDictionaryTKey, TValueKeysGets a collection containing the keys of the IReadOnlyDictionaryTKey, TValue.
(继承自 DictionaryString, String。)
IDictionaryKeysGets an ICollection containing the keys of the IDictionary.
(继承自 DictionaryString, String。)
ICollectionKeyValuePairTKey, TValueRemoveRemoves a key and value from the dictionary.
(继承自 DictionaryString, String。)
IDictionaryRemoveRemoves the element with the specified key from the IDictionary.
(继承自 DictionaryString, String。)
ICollectionSyncRootGets an object that can be used to synchronize access to the ICollection.
(继承自 DictionaryString, String。)
IDictionaryTKey, TValueValuesGets an ICollectionT containing the values in the IDictionaryTKey, TValue.
(继承自 DictionaryString, String。)
IReadOnlyDictionaryTKey, TValueValuesGets a collection containing the values of the IReadOnlyDictionaryTKey, TValue.
(继承自 DictionaryString, String。)
IDictionaryValuesGets an ICollection containing the values in the IDictionary.
(继承自 DictionaryString, String。)

参见