Photon Server API Documentation v5.0RC1

Public Member Functions | Public Attributes | List of all members
ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue > Struct Template Reference

A key used by the SynchronizedCachedSingletonFactory<TKey, TValue>. More...

Public Member Functions

 CacheKey (string cacheKey, TKey key, CreateMethodDelegate< TKey, TValue > createMethod)
 Initializes a new instance of the CacheKey<TKey,TValue> struct. More...
 
override bool Equals (object obj)
 Compares the keys of two CacheKey<TKey,TValue> instances. More...
 
override int GetHashCode ()
 Gets the hash code of the key. More...
 
override string ToString ()
 Returns a string representation of the instance. More...
 

Public Attributes

readonly string AspCacheKey
 THe asp net cache key. More...
 
readonly CreateMethodDelegate< TKey, TValue > CreateMethod
 The creation method. More...
 
readonly TKey Key
 The key. More...
 

Detailed Description

A key used by the SynchronizedCachedSingletonFactory<TKey, TValue>.

Template Parameters
TKeyThe type of keys the factory uses.
TValueThe type of values the factory uses.

Constructor & Destructor Documentation

◆ CacheKey()

ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.CacheKey ( string  cacheKey,
TKey  key,
CreateMethodDelegate< TKey, TValue >  createMethod 
)
inline

Initializes a new instance of the CacheKey<TKey,TValue> struct.

Parameters
cacheKeyThe cache key.
keyThe key.
createMethodThe creation method.

Member Function Documentation

◆ Equals()

override bool ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.Equals ( object  obj)
inline

Compares the keys of two CacheKey<TKey,TValue> instances.

Parameters
objThe obj.
Returns
True if keys equal.
Exceptions
InvalidCastExceptionobj is not a CacheKey<TKey,TValue>.

◆ GetHashCode()

override int ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.GetHashCode ( )
inline

Gets the hash code of the key.

Returns
The hash code of the key.

◆ ToString()

override string ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.ToString ( )
inline

Returns a string representation of the instance.

Returns
A string representation of the instance.

Member Data Documentation

◆ AspCacheKey

readonly string ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.AspCacheKey

THe asp net cache key.

◆ CreateMethod

readonly CreateMethodDelegate<TKey, TValue> ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.CreateMethod

The creation method.

◆ Key

readonly TKey ExitGames.Threading.CachedSingletonFactory.CacheKey< TKey, TValue >.Key

The key.