Class AccessDictionary<TKey, TValue, TKeyBase, TValueBase>
A wrapper for accessing the elements of an AccessDictionaryBase<TKey, TValue>
Inheritance
Implements
Inherited Members
Namespace: AssetRipper.Assets.Generics
Assembly: AssetRipper.Assets.dll
Syntax
public sealed class AccessDictionary<TKey, TValue, TKeyBase, TValueBase> : AccessDictionaryBase<TKeyBase, TValueBase> where TKey : TKeyBase, new()
where TValue : TValueBase, new()
Type Parameters
Name | Description |
---|---|
TKey | The key type of the reference dictionary |
TValue | The value type of the reference dictionary |
TKeyBase | The exposed key type, such as an interface |
TValueBase | The exposed value type, such as an interface |
Constructors
| Improve this Doc View SourceAccessDictionary(AssetDictionary<TKey, TValue>)
Declaration
public AccessDictionary(AssetDictionary<TKey, TValue> referenceDictionary)
Parameters
Type | Name | Description |
---|---|---|
AssetDictionary<TKey, TValue> | referenceDictionary |
Properties
| Improve this Doc View SourceCapacity
The capacity of the dictionary
Declaration
public override int Capacity { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Count
The number of pairs in the dictionary
Declaration
public override int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Methods
| Improve this Doc View SourceAdd(TKeyBase, TValueBase)
Add a pair to the dictionary
Declaration
public override void Add(TKeyBase key, TValueBase value)
Parameters
Type | Name | Description |
---|---|---|
TKeyBase | key | |
TValueBase | value |
Overrides
Remarks
This method is not necessarily type safe. It could throw exceptions if used improperly.
AddNew()
Add a new pair to the dictionary
Declaration
public override AccessPair<TKey, TValue, TKeyBase, TValueBase> AddNew()
Returns
Type | Description |
---|---|
AccessPair<TKey, TValue, TKeyBase, TValueBase> |
Overrides
Clear()
Declaration
public override void Clear()
Overrides
GetEnumerator()
Declaration
public override IEnumerator<AccessPair<TKey, TValue, TKeyBase, TValueBase>> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<AccessPair<TKey, TValue, TKeyBase, TValueBase>> |
Overrides
GetKey(Int32)
Get a key in the dictionary
Declaration
public override TKeyBase GetKey(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to access |
Returns
Type | Description |
---|---|
TKeyBase | The key at the specified index |
Overrides
GetPair(Int32)
Declaration
public override AccessPair<TKey, TValue, TKeyBase, TValueBase> GetPair(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Returns
Type | Description |
---|---|
AccessPair<TKey, TValue, TKeyBase, TValueBase> |
Overrides
GetValue(Int32)
Get a value in the dictionary
Declaration
public override TValueBase GetValue(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to access |
Returns
Type | Description |
---|---|
TValueBase | The value at the specified index |
Overrides
RemoveAt(Int32)
Declaration
public override void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Overrides
SetKey(Int32, TKeyBase)
Set a key in the dictionary
Declaration
public override void SetKey(int index, TKeyBase newKey)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to access |
TKeyBase | newKey |
Overrides
Remarks
This method is not necessarily type safe. It could throw exceptions if used improperly.
SetValue(Int32, TValueBase)
Set a value in the dictionary
Declaration
public override void SetValue(int index, TValueBase newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index to access |
TValueBase | newValue |
Overrides
Remarks
This method is not necessarily type safe. It could throw exceptions if used improperly.
TryGetSinglePairForKey(TKeyBase, out AccessPairBase<TKeyBase, TValueBase>)
Declaration
public override bool TryGetSinglePairForKey(TKeyBase key, out AccessPairBase<TKeyBase, TValueBase> pair)
Parameters
Type | Name | Description |
---|---|---|
TKeyBase | key | |
AccessPairBase<TKeyBase, TValueBase> | pair |
Returns
Type | Description |
---|---|
System.Boolean |