• Articles
  • Api Documentation
Show / Hide Table of Contents
  • DDSLoader
    • DDSImage
    • DDSImage.DDSHeader
    • DDSImage.DDSPixelFormat
    • DDSImage.HeaderFlags
    • DDSImage.PixelFormatFlags
    • DDSUnityExtensions
    • FourCC
  • LLBML
    • BallApi
    • CharacterApi
    • GraphicUtils
    • InputApi
    • LLBMLPlugin
    • LoadingInfo
    • LoadingScreen
    • PluginInfos
    • ProgressApi
    • ScreenApi
    • StateApi
  • LLBML.Audio
    • AudioAsset
    • AudioCache
    • AudioInfo
    • AudioUtils
  • LLBML.External
    • IntHelpers
    • Murmur3
  • LLBML.GameEvents
    • GameEvents
    • GameStateEvents
    • LobbyEventArgs
    • LobbyEvents
    • LobbyReadyArgs
    • MenuEvents
    • OnLobbyEnteredHandler
    • OnLobbyReadyHandler
    • OnMainMenuEnteredArgs
    • OnMainMenuEnteredHandler
    • OnMainMenuFirstEnteredHandler
    • OnPlayerJoinArgs
    • OnPlayerJoinHandler
    • OnStateChangeArgs
    • OnStateChangeHandler
    • OnUnlinkFromPlayerArgs
    • OnUnlinkFromPlayerHandler
    • OnUserCharacterPickArgs
    • OnUserCharacterPickHandler
    • OnUserSkinClickArgs
    • OnUserSkinClickHandler
  • LLBML.Graphic
    • Draw
    • Draw.Alignment
  • LLBML.Math
    • BinaryUtils
    • Boundsf
    • Floatf
    • Vector2f
    • Vector2i
  • LLBML.Messages
    • CustomMessage
    • MessageActions
    • MessageApi
    • MessageApi.OnReceiveMessageHandler
    • MessageEventArgs
  • LLBML.Networking
    • Channel
    • EnvelopeApi
    • EnvelopeApi.OnReceiveEnvelopeHandler
    • EnvelopeEventArgs
    • EP2PSend
    • EP2PSend.Enum
    • EP2PSend.Enum_Mapping
    • NetworkApi
    • Transaction
    • TransactionCode
    • TransactionState
  • LLBML.Players
    • Player
    • PlayerStatus
    • PlayerStatus.Enum
    • PlayerStatus.Enum_Mappings
    • Team
    • Team.Enum
    • Team.Enum_Mappings
  • LLBML.Settings
    • GameSettings
  • LLBML.States
    • GameState
    • GameState.Enum
    • GameState.Enum_Mapping
    • GameStates
    • GameStatesGameUtils
    • GameStatesLobbyUtils
    • PlayerLobbyState
  • LLBML.Texture
    • TextureUtils
  • LLBML.UI
    • Dialogs
  • LLBML.Utils
    • ArrayExtension
    • BepInRef
    • ControlledRandom
    • DebugUtils
    • EnumWrapper<T>
    • GenericCache<K, T>
    • GenericUtils
    • Hash<T>
    • IByteable
    • ModDependenciesUtils
    • ModdingFolder
    • PatchUtils
    • StringUtils

Class GenericCache<K, T>

A class to store and retreive T

Inheritance
System.Object
GenericCache<K, T>
AudioCache
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: LLBML.Utils
Assembly: LLBModdingLib.dll
Syntax
public abstract class GenericCache<K, T>
Type Parameters
Name Description
K
T

Fields

cache

The cache.

Declaration
protected Dictionary<K, List<T>> cache
Field Value
Type Description
System.Collections.Generic.Dictionary<K, System.Collections.Generic.List<T>>

Properties

Count

The number of T currently stored in the cache

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Item[K]

Gets the System.Collections.Generic.List<T> with the specified key.

Declaration
public virtual List<T> this[K key] { get; }
Parameters
Type Name Description
K key

Key.

Property Value
Type Description
System.Collections.Generic.List<T>

Logger

Declaration
protected static ManualLogSource Logger { get; }
Property Value
Type Description
BepInEx.Logging.ManualLogSource

Methods

Add(K, T)

Adds the specified key and value to the cache.

Declaration
public virtual void Add(K key, T value)
Parameters
Type Name Description
K key

The key to insert into.

T value

The value to insert.

Clear()

Empties the cache

Declaration
public virtual void Clear()

ContainsKey(K)

Check if the cache contains the key

Declaration
public virtual bool ContainsKey(K key)
Parameters
Type Name Description
K key

The key.

Returns
Type Description
System.Boolean

true, if key is present, false otherwise.

GetEntries(K)

Gets the System.Collections.Generic.List<T> with the specified key.

Declaration
protected virtual List<T> GetEntries(K key)
Parameters
Type Name Description
K key

The chache key

Returns
Type Description
System.Collections.Generic.List<T>

GetEntry(K)

Gets the first cached entry with the specified key.

Declaration
protected virtual T GetEntry(K key)
Parameters
Type Name Description
K key

The list index

Returns
Type Description
T

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()
In This Article
Back to top Generated by DocFX