Show / Hide Table of Contents

Interface IClassObjectCache<TKey, TValue>

An interface for caching objects according to class info and object info.

Inherited Members
IObjectCache<TKey, TValue>.GetObjectAge(TKey)
IObjectCache<TKey, TValue>.GetObjectAge(TKey, DateTime)
IObjectCache<TKey, TValue>.RefreshObject(TKey)
IObjectCache<TKey, TValue>.RefreshObject(TKey, DateTime)
ICollection<TValue>.Add(TValue)
ICollection<TValue>.Clear()
ICollection<TValue>.Contains(TValue)
ICollection<TValue>.CopyTo(TValue[], int)
ICollection<TValue>.Remove(TValue)
ICollection<TValue>.Count
ICollection<TValue>.IsReadOnly
IEnumerable<TValue>.GetEnumerator()
IDictionary<TKey, TValue>.Add(TKey, TValue)
IDictionary<TKey, TValue>.ContainsKey(TKey)
IDictionary<TKey, TValue>.Remove(TKey)
IDictionary<TKey, TValue>.TryGetValue(TKey, out TValue)
IDictionary<TKey, TValue>.this[TKey]
IDictionary<TKey, TValue>.Keys
IDictionary<TKey, TValue>.Values
ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue>)
ICollection<KeyValuePair<TKey, TValue>>.Clear()
ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue>)
ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[], int)
ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue>)
ICollection<KeyValuePair<TKey, TValue>>.Count
ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly
IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
Namespace: Microsoft.XboxStudios.GameStateTracker.Cache
Assembly: GameStateTracker.Abstractions.dll
Syntax
public interface IClassObjectCache<TKey, TValue> : IObjectCache<TKey, TValue>, ICollection<TValue>, IEnumerable<TValue>, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Type Parameters
Name Description
TKey

The info type.

TValue

The object type.

Methods

View Source

ClearClass(TKey)

Removes all matching objects from the cache.

Declaration
void ClearClass(TKey classKey)
Parameters
Type Name Description
TKey classKey

The object info.

View Source

GetClassAge(TKey)

Gets the age of a set of objects in the cache.

Declaration
TimeSpan? GetClassAge(TKey classKey)
Parameters
Type Name Description
TKey classKey

The objects to search for.

Returns
Type Description
TimeSpan?

The time since the objects were last refreshed.

View Source

GetClassAge(TKey, DateTime)

Gets the age of a set of objects in the cache.

Declaration
TimeSpan? GetClassAge(TKey classKey, DateTime now)
Parameters
Type Name Description
TKey classKey

The objects to search for.

DateTime now

The current time to compare to.

Returns
Type Description
TimeSpan?

The time since the objects were last refreshed.

View Source

RefreshClass(TKey)

Updates the age of all matching objects in the cache.

Declaration
void RefreshClass(TKey classKey)
Parameters
Type Name Description
TKey classKey

The objects to search for.

View Source

RefreshClass(TKey, DateTime)

Updates the age of all matching objects in the cache.

Declaration
void RefreshClass(TKey classKey, DateTime now)
Parameters
Type Name Description
TKey classKey

The objects to search for.

DateTime now

The current time to set.

  • View Source
In this article
Back to top Generated by DocFX