Fantasy
搜索结果

    显示/隐藏目录

    OneToManySortedDictionary<TKey, TSortedKey, TValue> 类

    一对多映射关系的排序字典。每个外部键映射到一个内部排序字典,该内部排序字典将排序键映射到相应的值。

    继承
    object
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>
    OneToManySortedDictionary<TKey, TSortedKey, TValue>
    OneToManySortedDictionaryPool<TKey, TSortedKey, TValue>
    实现
    IDictionary<TKey, SortedDictionary<TSortedKey, TValue>>
    ICollection<KeyValuePair<TKey, SortedDictionary<TSortedKey, TValue>>>
    IReadOnlyDictionary<TKey, SortedDictionary<TSortedKey, TValue>>
    IReadOnlyCollection<KeyValuePair<TKey, SortedDictionary<TSortedKey, TValue>>>
    IEnumerable<KeyValuePair<TKey, SortedDictionary<TSortedKey, TValue>>>
    IDictionary
    ICollection
    IEnumerable
    IDeserializationCallback
    ISerializable
    继承成员
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Add(TKey, SortedDictionary<TSortedKey, TValue>)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Clear()
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.ContainsKey(TKey)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.ContainsValue(SortedDictionary<TSortedKey, TValue>)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.EnsureCapacity(int)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.GetEnumerator()
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.GetObjectData(SerializationInfo, StreamingContext)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.OnDeserialization(object)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Remove(TKey)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Remove(TKey, out SortedDictionary<TSortedKey, TValue>)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.TrimExcess()
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.TrimExcess(int)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.TryAdd(TKey, SortedDictionary<TSortedKey, TValue>)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.TryGetValue(TKey, out SortedDictionary<TSortedKey, TValue>)
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Comparer
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Count
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.this[TKey]
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Keys
    Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>.Values
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    命名空间: Fantasy.DataStructure.Dictionary
    程序集: Fantasy.Net.dll
    语法
    public class OneToManySortedDictionary<TKey, TSortedKey, TValue> : Dictionary<TKey, SortedDictionary<TSortedKey, TValue>>, IDictionary<TKey, SortedDictionary<TSortedKey, TValue>>, ICollection<KeyValuePair<TKey, SortedDictionary<TSortedKey, TValue>>>, IReadOnlyDictionary<TKey, SortedDictionary<TSortedKey, TValue>>, IReadOnlyCollection<KeyValuePair<TKey, SortedDictionary<TSortedKey, TValue>>>, IEnumerable<KeyValuePair<TKey, SortedDictionary<TSortedKey, TValue>>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable where TKey : notnull where TSortedKey : notnull
    类型参数
    名称 描述
    TKey

    外部字典中的键类型。

    TSortedKey

    内部字典中的排序键类型。

    TValue

    内部字典中的值类型。

    构造函数

    | 编辑本文 查看源代码

    OneToManySortedDictionary()

    创建一个新的 OneToManySortedDictionary<TKey, TSortedKey, TValue> 实例。

    声明
    protected OneToManySortedDictionary()
    | 编辑本文 查看源代码

    OneToManySortedDictionary(int)

    创建一个新的 OneToManySortedDictionary<TKey, TSortedKey, TValue> 实例。设置最大缓存数量

    声明
    public OneToManySortedDictionary(int recyclingLimit)
    参数
    类型 名称 描述
    int recyclingLimit

    1:防止数据量过大、所以超过recyclingLimit的数据还是走GC. 2:设置成0不控制数量,全部缓存

    方法

    | 编辑本文 查看源代码

    Add(TKey, TSortedKey, TValue)

    向字典中添加一个值,关联到指定的外部键和排序键。

    声明
    public void Add(TKey key, TSortedKey sortedKey, TValue value)
    参数
    类型 名称 描述
    TKey key

    要关联值的外部键。

    TSortedKey sortedKey

    要关联值的排序键。

    TValue value

    要添加的值。

    | 编辑本文 查看源代码

    Clear()

    清空字典以及内部排序字典缓存队列,释放所有资源。

    声明
    protected void Clear()
    | 编辑本文 查看源代码

    Contains(TKey)

    检查字典是否包含指定的外部键。

    声明
    public bool Contains(TKey key)
    参数
    类型 名称 描述
    TKey key

    要检查的外部键。

    返回
    类型 描述
    bool

    如果字典包含指定的外部键,则为 true;否则为 false。

    | 编辑本文 查看源代码

    Contains(TKey, TSortedKey)

    检查字典是否包含指定的外部键和排序键。

    声明
    public bool Contains(TKey key, TSortedKey sortedKey)
    参数
    类型 名称 描述
    TKey key

    要检查的外部键。

    TSortedKey sortedKey

    要检查的排序键。

    返回
    类型 描述
    bool

    如果字典包含指定的外部键和排序键,则为 true;否则为 false。

    | 编辑本文 查看源代码

    RemoveKey(TKey)

    从字典中移除指定外部键及其关联的所有值。

    声明
    public bool RemoveKey(TKey key)
    参数
    类型 名称 描述
    TKey key

    要移除的外部键。

    返回
    类型 描述
    bool

    如果成功移除外部键及其关联的所有值,则为 true;否则为 false。

    | 编辑本文 查看源代码

    RemoveSortedKey(TKey, TSortedKey)

    从字典中移除指定外部键和排序键关联的值。

    声明
    public bool RemoveSortedKey(TKey key, TSortedKey sortedKey)
    参数
    类型 名称 描述
    TKey key

    要移除值的外部键。

    TSortedKey sortedKey

    要移除值的排序键。

    返回
    类型 描述
    bool

    如果成功移除值,则为 true;否则为 false。

    | 编辑本文 查看源代码

    TryGetValue(TKey, out SortedDictionary<TSortedKey, TValue>)

    尝试从字典中获取指定外部键对应的内部排序字典。

    声明
    public bool TryGetValue(TKey key, out SortedDictionary<TSortedKey, TValue> dic)
    参数
    类型 名称 描述
    TKey key

    要获取内部排序字典的外部键。

    SortedDictionary<TSortedKey, TValue> dic

    获取到的内部排序字典,如果找不到则为 null。

    返回
    类型 描述
    bool

    如果找到内部排序字典,则为 true;否则为 false。

    | 编辑本文 查看源代码

    TryGetValueBySortedKey(TKey, TSortedKey, out TValue)

    尝试从字典中获取指定外部键和排序键对应的值。

    声明
    public bool TryGetValueBySortedKey(TKey key, TSortedKey sortedKey, out TValue value)
    参数
    类型 名称 描述
    TKey key

    要获取值的外部键。

    TSortedKey sortedKey

    要获取值的排序键。

    TValue value

    获取到的值,如果找不到则为 default。

    返回
    类型 描述
    bool

    如果找到值,则为 true;否则为 false。

    实现

    IDictionary<TKey, TValue>
    ICollection<T>
    IReadOnlyDictionary<TKey, TValue>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IDictionary
    ICollection
    IEnumerable
    IDeserializationCallback
    ISerializable

    扩展方法

    JsonHelper.ToJson<T>(T)
    DictionaryExtensions.TryRemove<T, TV>(IDictionary<T, TV>, T, out TV)
    • 编辑本文
    • 查看源代码
    本文内容
    Back to top Generated by DocFX