Show / Hide Table of Contents

Class AccessDictionaryBase<TKey, TValue>

Access the contents of a dictionary

Inheritance
System.Object
AccessDictionaryBase<TKey, TValue>
AccessDictionary<TKey, TValue, TKeyBase, TValueBase>
AssetDictionary<TKey, TValue>
Implements
IReadOnlyCollection<KeyValuePair<TKey, TValue>>
Namespace: AssetRipper.Assets.Generics
Assembly: AssetRipper.Assets.dll
Syntax
public abstract class AccessDictionaryBase<TKey, TValue> : IReadOnlyCollection<AccessPairBase<TKey, TValue>>
Type Parameters
Name Description
TKey

The exposed key type, such as an interface, base type, or primitive type

TValue

The exposed value type, such as an interface, base type, or primitive type

Properties

| Improve this Doc View Source

Capacity

The capacity of the dictionary

Declaration
public abstract int Capacity { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Count

The number of pairs in the dictionary

Declaration
public abstract int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Item[TKey]

Access a value in the dictionary

Declaration
public TValue this[TKey key] { get; set; }
Parameters
Type Name Description
TKey key
Property Value
Type Description
TValue
Remarks

The get method is type safe. The set method is not necessarily type safe and could throw exceptions if used improperly. Both will throw if the key isn't unique.

| Improve this Doc View Source

Keys

The keys in the dictionary

Declaration
public IEnumerable<TKey> Keys { get; }
Property Value
Type Description
System.Collections.IEnumerable<TKey>
| Improve this Doc View Source

Values

The values in the dictionary

Declaration
public IEnumerable<TValue> Values { get; }
Property Value
Type Description
System.Collections.IEnumerable<TValue>

Methods

| Improve this Doc View Source

Add(TKey, TValue)

Add a pair to the dictionary

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

The key to be added

TValue value

The value to be added

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 abstract AccessPairBase<TKey, TValue> AddNew()
Returns
Type Description
AccessPairBase<TKey, TValue>
| Improve this Doc View Source

Clear()

Declaration
public abstract void Clear()
| Improve this Doc View Source

ContainsKey(TKey)

Declaration
public bool ContainsKey(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetEnumerator()

Declaration
public abstract IEnumerator<AccessPairBase<TKey, TValue>> GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator<AccessPairBase<TKey, TValue>>
| Improve this Doc View Source

GetKey(Int32)

Get a key in the dictionary

Declaration
public abstract 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

| Improve this Doc View Source

GetPair(Int32)

Get a pair in the dictionary

Declaration
public abstract AccessPairBase<TKey, TValue> GetPair(int index)
Parameters
Type Name Description
System.Int32 index

The index to access

Returns
Type Description
AccessPairBase<TKey, TValue>

The pair at the specified index

| Improve this Doc View Source

GetSinglePairForKey(TKey)

Declaration
public AccessPairBase<TKey, TValue> GetSinglePairForKey(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
AccessPairBase<TKey, TValue>
| Improve this Doc View Source

GetValue(Int32)

Get a value in the dictionary

Declaration
public abstract 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

| Improve this Doc View Source

RemoveAt(Index)

Declaration
public void RemoveAt(Index index)
Parameters
Type Name Description
Index index
| Improve this Doc View Source

RemoveAt(Int32)

Declaration
public abstract void RemoveAt(int index)
Parameters
Type Name Description
System.Int32 index
| Improve this Doc View Source

SetKey(Int32, TKey)

Set a key in the dictionary

Declaration
public abstract 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

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 abstract 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

Remarks

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

| Improve this Doc View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
| Improve this Doc View Source

TryAdd(TKey, TValue)

Declaration
public bool TryAdd(TKey key, TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean
| Improve this Doc View Source

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

Declaration
public abstract bool TryGetSinglePairForKey(TKey key, out AccessPairBase<TKey, TValue> pair)
Parameters
Type Name Description
TKey key
AccessPairBase<TKey, TValue> pair
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetValue(TKey)

Declaration
public TValue TryGetValue(TKey key)
Parameters
Type Name Description
TKey key
Returns
Type Description
TValue
| Improve this Doc View Source

TryGetValue(TKey, out TValue)

Declaration
public bool TryGetValue(TKey key, out TValue value)
Parameters
Type Name Description
TKey key
TValue value
Returns
Type Description
System.Boolean

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

Implements

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