/// <summary> /// Accesses the value /// </summary> /// <param name="type">the transaction type which determines which part of the buffer is accessed</param> /// <returns>the value stored</returns> public TValue this[BufferTransactionType type] { get => _value[(int)type];
/// <summary> /// Access the data buffer information /// </summary> /// <param name="type">Determines how the information can be manipulated and where information is retrieved from</param> /// <param name="index">the index to retrieve data from</param> /// <returns>the value at the given index from the corresponding buffer</returns> public Tuple <TPrimary, TSecondary> this[BufferTransactionType type, int index] { get => Get(type, index);
/// <summary> /// Access the data buffer information /// </summary> /// <param name="type">Determines how the information can be manipulated and where information is retrieved from</param> /// <param name="index">the index to retrieve data from</param> /// <returns>the value at the given index from the corresponding buffer</returns> public TValue this[BufferTransactionType type, int index] { get => Get(type, index);
public Enumerator(BufferTransactionType type, NameBuffer buff) { _buff = buff; _next = -2; _type = type; }
/// <summary> /// Accesses a specified value at a given ID for a given transaction type /// (Set operations do not work for ReadOnly transactions) /// </summary> /// <param name="type">the type of transaction</param> /// <param name="id">the ID associated with the value</param> /// <returns>the value associated with the ID</returns> public string this[BufferTransactionType type, int id] { get => GetNameFromID(type, id);
/// <summary> /// Basic constructor for the enumerator /// </summary> /// <param name="type">the transaction type, used to define where the information comes from</param> /// <param name="buffer">the buffer data comes from</param> public Enumerator(BufferTransactionType type, SingletonBuffer <TComponent> buffer) { _type = type; _buffer = buffer; }