Class StructureCacheBase<TKey, TValue>
A reference-based cache where the value is a struct.
Inheritance
System.Object
StructureCacheBase<TKey, TValue>
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)
System.Object.ToString()
Namespace: ExtendedXmlSerializer.Core.Sources
Assembly: ExtendedXmlSerializer.dll
Syntax
public abstract class StructureCacheBase<TKey, TValue> : ITableSource<TKey, TValue>, ISpecification<TKey>, IParameterizedSource<TKey, TValue>, IAssignable<TKey, TValue> where TKey : class where TValue : struct
Type Parameters
TKey
The key type. |
TValue
The value-type. |
Constructors
StructureCacheBase()
Creates a new instance.
Declaration
protected StructureCacheBase()
Methods
Assign(TKey, TValue)
Assigns a value with the associated key.
Declaration
public virtual void Assign(TKey key, TValue value)
Parameters
TKey
key
The key. |
TValue
value
The value. |
Implements
Create(TKey)
Declaration
protected abstract TValue Create(TKey parameter)
Parameters
TKey
parameter
|
Returns
TValue
|
Get(TKey)
Performs the selection.
Declaration
public virtual TValue Get(TKey key)
Parameters
TKey
key
|
Returns
TValue
A value of the return type. |
Implements
IsSatisfiedBy(TKey)
Returns a boolean based on the provided parameter.
Declaration
public bool IsSatisfiedBy(TKey parameter)
Parameters
TKey
parameter
|
Returns
System.Boolean
The condition based on the provided parameter. |
Implements
Remove(TKey)
Removes the value (if any) found with the specified key.
Declaration
public bool Remove(TKey key)
Parameters
TKey
key
The key used to query. |
Returns
System.Boolean
Result of removal. |