Photon Server API Documentation v5.0RC1

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

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

Public Member Functions

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

Public Attributes

readonly CacheKey< TKey, TValue > Key
 The cache key. More...
 
readonly TValue Value
 The value. More...
 

Detailed Description

A value 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

◆ CacheValue()

ExitGames.Threading.CachedSingletonFactory.CacheValue< TKey, TValue >.CacheValue ( CacheKey< TKey, TValue >  key,
TValue  value 
)
inline

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

Parameters
keyThe key.
valueThe value.

Member Function Documentation

◆ Equals()

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

Compares the values of two CacheValue<TKey,TValue> instances.

Parameters
objThe obj.
Returns
True if values are equal.
Exceptions
InvalidCastExceptionobj is not a CacheValue<TKey,TValue>.

◆ GetHashCode()

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

Gets the hash code of the value.

Returns
The hash code of the value.

◆ ToString()

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

Returns a string representation of the instance.

Returns
A string representation of the instance.

Member Data Documentation

◆ Key

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

The cache key.

◆ Value

readonly TValue ExitGames.Threading.CachedSingletonFactory.CacheValue< TKey, TValue >.Value

The value.