Show / Hide Table of Contents

Class AssetDictionary<TKey, TValue>

A dictionary class supporting non-unique keys

Inheritance
System.Object
AccessDictionaryBase<TKey, TValue>
AssetDictionary<TKey, TValue>
Implements
IReadOnlyCollection<KeyValuePair<TKey, TValue>>
Inherited Members
AccessDictionaryBase<TKey, TValue>.Capacity
AccessDictionaryBase<TKey, TValue>.Count
AccessDictionaryBase<TKey, TValue>.Keys
AccessDictionaryBase<TKey, TValue>.Values
AccessDictionaryBase<TKey, TValue>.Add(TKey, TValue)
AccessDictionaryBase<TKey, TValue>.AddNew()
AccessDictionaryBase<TKey, TValue>.ContainsKey(TKey)
AccessDictionaryBase<TKey, TValue>.GetKey(Int32)
AccessDictionaryBase<TKey, TValue>.GetValue(Int32)
AccessDictionaryBase<TKey, TValue>.GetPair(Int32)
AccessDictionaryBase<TKey, TValue>.SetKey(Int32, TKey)
AccessDictionaryBase<TKey, TValue>.SetValue(Int32, TValue)
AccessDictionaryBase<TKey, TValue>.RemoveAt(Int32)
AccessDictionaryBase<TKey, TValue>.RemoveAt(Index)
AccessDictionaryBase<TKey, TValue>.Clear()
AccessDictionaryBase<TKey, TValue>.GetSinglePairForKey(TKey)
AccessDictionaryBase<TKey, TValue>.TryGetSinglePairForKey(TKey, AccessPairBase<TKey, TValue>)
AccessDictionaryBase<TKey, TValue>.Item[TKey]
AccessDictionaryBase<TKey, TValue>.TryGetValue(TKey, TValue)
AccessDictionaryBase<TKey, TValue>.TryGetValue(TKey)
AccessDictionaryBase<TKey, TValue>.GetEnumerator()
AccessDictionaryBase<TKey, TValue>.IEnumerable.GetEnumerator()
AccessDictionaryBase<TKey, TValue>.ToString()
AccessDictionaryBase<TKey, TValue>.TryAdd(TKey, TValue)
Namespace: AssetRipper.Assets.Generics
Assembly: AssetRipper.Assets.dll
Syntax
public sealed class AssetDictionary<TKey, TValue> : AccessDictionaryBase<TKey, TValue> where TKey : new()
    where TValue : new()
Type Parameters
Name Description
TKey

The type of the keys in the dictionary.

TValue

The type of the values in the dictionary.

Constructors

| Improve this Doc View Source

AssetDictionary()

Declaration
public AssetDictionary()
| Improve this Doc View Source

AssetDictionary(Int32)

Declaration
public AssetDictionary(int capacity)
Parameters
Type Name Description
System.Int32 capacity

Properties

| Improve this Doc View Source

Capacity

The capacity of the dictionary

Declaration
public override int Capacity { get; set; }
Property Value
Type Description
System.Int32
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.Capacity
| Improve this Doc View Source

Count

The number of pairs in the dictionary

Declaration
public override int Count { get; }
Property Value
Type Description
System.Int32
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.Count

Methods

| Improve this Doc View Source

Add(TKey, TValue)

Add a pair to the dictionary

Declaration
public override void Add(TKey key, TValue value)
Parameters
Type Name Description
TKey key

The key to be added

TValue value

The value to be added

Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.Add(TKey, TValue)
Remarks

This method is not necessarily type safe. It could throw exceptions if used improperly.

| Improve this Doc View Source

AddNew()

Add a new pair to the dictionary

Declaration
public override AssetPair<TKey, TValue> AddNew()
Returns
Type Description
AssetPair<TKey, TValue>
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.AddNew()
| Improve this Doc View Source

Clear()

Declaration
public override void Clear()
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.Clear()
| Improve this Doc View Source

EnsureCapacity(Int32)

Ensures that the capacity of this list is at least the specified capacity. If the current capacity of the list is less than specified capacity, the capacity is increased by continuously twice current capacity until it is at least the specified capacity.

Declaration
public int EnsureCapacity(int capacity)
Parameters
Type Name Description
System.Int32 capacity

The minimum capacity to ensure.

Returns
Type Description
System.Int32

The new capacity of this list.

| Improve this Doc View Source

GetEnumerator()

Declaration
public override IEnumerator<AssetPair<TKey, TValue>> GetEnumerator()
Returns
Type Description
IEnumerator<AssetPair<TKey, TValue>>
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.GetEnumerator()
| Improve this Doc View Source

GetKey(Int32)

Get a key in the dictionary

Declaration
public override TKey GetKey(int index)
Parameters
Type Name Description
System.Int32 index

The index to access

Returns
Type Description
TKey

The key at the specified index

Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.GetKey(System.Int32)
| Improve this Doc View Source

GetPair(Int32)

Declaration
public override AssetPair<TKey, TValue> GetPair(int index)
Parameters
Type Name Description
System.Int32 index
Returns
Type Description
AssetPair<TKey, TValue>
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.GetPair(System.Int32)
| Improve this Doc View Source

GetValue(Int32)

Get a value in the dictionary

Declaration
public override TValue GetValue(int index)
Parameters
Type Name Description
System.Int32 index

The index to access

Returns
Type Description
TValue

The value at the specified index

Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.GetValue(System.Int32)
| Improve this Doc View Source

RemoveAt(Int32)

Declaration
public override void RemoveAt(int index)
Parameters
Type Name Description
System.Int32 index
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.RemoveAt(System.Int32)
| Improve this Doc View Source

SetKey(Int32, TKey)

Set a key in the dictionary

Declaration
public override void SetKey(int index, TKey newKey)
Parameters
Type Name Description
System.Int32 index

The index to access

TKey newKey

The new key to be assigned

Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.SetKey(System.Int32, TKey)
Remarks

This method is not necessarily type safe. It could throw exceptions if used improperly.

| Improve this Doc View Source

SetValue(Int32, TValue)

Set a value in the dictionary

Declaration
public override void SetValue(int index, TValue newValue)
Parameters
Type Name Description
System.Int32 index

The index to access

TValue newValue

The new value to be assigned

Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.SetValue(System.Int32, TValue)
Remarks

This method is not necessarily type safe. It could throw exceptions if used improperly.

| Improve this Doc View Source

TryGetSinglePairForKey(TKey, out AccessPairBase<TKey, TValue>)

Declaration
public override bool TryGetSinglePairForKey(TKey key, out AccessPairBase<TKey, TValue> pair)
Parameters
Type Name Description
TKey key
AccessPairBase<TKey, TValue> pair
Returns
Type Description
System.Boolean
Overrides
AssetRipper.Assets.Generics.AccessDictionaryBase<TKey, TValue>.TryGetSinglePairForKey(TKey, AssetRipper.Assets.Generics.AccessPairBase<TKey, TValue>)

Implements

IReadOnlyCollection<>
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾