Show / Hide Table of Contents

Class ReferenceCacheBase<TKey, TValue>

A base object for storing values keyed on reference.

Inheritance
System.Object
ReferenceCacheBase<TKey, TValue>
ReferenceCache<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 ReferenceCacheBase<TKey, TValue> : ITableSource<TKey, TValue>, ISpecification<TKey>, IParameterizedSource<TKey, TValue>, IAssignable<TKey, TValue> where TKey : class where TValue : class
Type Parameters
TKey

The key reference type.

TValue

The value type.

Constructors

ReferenceCacheBase()

Declaration
protected ReferenceCacheBase()

ReferenceCacheBase(ConditionalWeakTable<TKey, TValue>)

Creates a new instance.

Declaration
protected ReferenceCacheBase(ConditionalWeakTable<TKey, TValue> cache)
Parameters
System.Runtime.CompilerServices.ConditionalWeakTable<TKey, TValue> cache

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
IAssignable<TKey, TValue>.Assign(TKey, TValue)

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
IParameterizedSource<TParameter, TResult>.Get(TParameter)

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
ISpecification<T>.IsSatisfiedBy(T)

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.

Implements
ITableSource<TKey, TValue>.Remove(TKey)

Extension Methods

ExtensionMethods.Return<T, TOut>(T, TOut)
ExtensionMethods.Apply<TKey, TValue>(IAssignable<TKey, TValue>, TKey, TValue)
ExtensionMethods.To<T>(Object)
ExtensionMethods.AsValid<T>(Object, String)
ExtensionMethodsForAttachedProperties.Get<TType, TValue>(TType, Property<TType, TValue>)
ExtensionMethodsForAttachedProperties.Set<TType, TValue>(TType, Property<TType, TValue>, TValue)
ExtensionMethodsForCoreSources.To<TParameter, TResult, TTo>(IParameterizedSource<TParameter, TResult>, IParameterizedSource<TResult, TTo>)
ExtensionMethodsForCoreSources.In<TFrom, TTo, TResult>(IParameterizedSource<TTo, TResult>, IParameterizedSource<TFrom, TTo>)
ExtensionMethodsForCoreSources.If<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, ISpecification<TParameter>)
ExtensionMethodsForCoreSources.If<TParameter, TResult>(TResult, ISpecification<TParameter>)
ExtensionMethodsForCoreSources.Let<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, ISpecification<TParameter>, IParameterizedSource<TParameter, TResult>)
ExtensionMethodsForCoreSources.Let<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, ISpecification<TParameter>, ISpecification<TResult>, IParameterizedSource<TParameter, TResult>)
ExtensionMethodsForCoreSources.Let<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, ISpecification<TParameter>, TResult)
ExtensionMethodsForCoreSources.Let<TSpecification, TInstance>(TInstance, ISpecification<TSpecification>, TInstance)
ExtensionMethodsForCoreSources.Or<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, IParameterizedSource<TParameter, TResult>)
ExtensionMethodsForCoreSources.Build<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, TParameter)
ExtensionMethodsForCoreSources.FixedSelection<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, TParameter)
ExtensionMethodsForCoreSources.ToSelectionDelegate<TParameter, TResult>(IParameterizedSource<TParameter, TResult>)
ExtensionMethodsForCoreSources.ToDelegate<TParameter, TResult>(IParameterizedSource<TParameter, TResult>)
ExtensionMethodsForCoreSources.Fix<TParameter, TResult>(IParameterizedSource<TParameter, TResult>, TParameter)
ExtensionMethodsForCoreSpecifications.IfAssigned<TParameter, TResult>(IParameterizedSource<TParameter, TResult>)
ExtensionMethodsForCoreSpecifications.ToDelegate<T>(ISpecification<T>)
ExtensionMethodsForCoreSpecifications.Build<T>(ISpecification<T>, T)
ExtensionMethodsForCoreSpecifications.Fix<T>(ISpecification<T>, T)
ExtensionMethodsForCoreSpecifications.Any<T>(ISpecification<T>, T[])
ExtensionMethodsForCoreSpecifications.Or<T>(ISpecification<T>, ISpecification<T>[])
ExtensionMethodsForCoreSpecifications.And<T>(ISpecification<T>, ISpecification<T>[])
ExtensionMethodsForCoreSpecifications.Inverse<T>(ISpecification<T>)
ExtensionMethodsForCoreSpecifications.AdaptForNull<T>(ISpecification<T>)
ExtensionMethodsForCoreSpecifications.Adapt<T>(ISpecification<T>)
Back to top Generated by DocFX