Show / Hide Table of Contents

Class NullItemCache

Represents an unused and always empty cache of repository items.

Inheritance
object
ItemCache
NullItemCache
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
public class NullItemCache : ItemCache

Properties

this[IdentifierTriple]

Gets or sets the IVersionable with the specified identifier.

Declaration
public override IVersionable this[IdentifierTriple index] { get; set; }
Parameters
Type Name Description
IdentifierTriple index

The identifier of the item.

Property Value
Type Description
IVersionable

The IVersionable.

Overrides
ItemCache.this[IdentifierTriple]

Methods

ContainsItem(IdentifierTriple)

Determines whether the cache contains an entry for the specified identifier.

Declaration
public override bool ContainsItem(IdentifierTriple triple)
Parameters
Type Name Description
IdentifierTriple triple

The identifer.

Returns
Type Description
bool

true if an item with the specified identifier is contained in the cache; otherwise false.

Overrides
ItemCache.ContainsItem(IdentifierTriple)

Remove(IdentifierTriple)

Remove an entry for the specified identifier.

Declaration
public override bool Remove(IdentifierTriple triple)
Parameters
Type Name Description
IdentifierTriple triple

The identifer.

Returns
Type Description
bool

true if an item with the specified identifier is removed from the cache; otherwise false.

Overrides
ItemCache.Remove(IdentifierTriple)

TryGetItem(IdentifierTriple, out IVersionable)

Gets the item from the cache, if it exists.

Declaration
public override bool TryGetItem(IdentifierTriple triple, out IVersionable item)
Parameters
Type Name Description
IdentifierTriple triple

The identifier of the item to retrieve.

IVersionable item

The item.

Returns
Type Description
bool

trueif the item was succesfully retrieved; otherwise false.

Overrides
ItemCache.TryGetItem(IdentifierTriple, out IVersionable)

TryGetItem<T>(IdentifierTriple, out T)

Gets the item from the cache, if it exists.

Declaration
public override bool TryGetItem<T>(IdentifierTriple triple, out T item) where T : class, IVersionable, new()
Parameters
Type Name Description
IdentifierTriple triple

The identifier triple of the item to retrieve.

T item

The item.

Returns
Type Description
bool

trueif the item was succesfully retrieved; otherwise false.

Type Parameters
Name Description
T

The type of the item.

Overrides
ItemCache.TryGetItem<T>(IdentifierTriple, out T)

Extension Methods

Extensions.Yield<T>(T)
In this article
Back to top Generated by DocFX