Show / Hide Table of Contents

Class ItemCache

Represents a 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 ItemCache

Properties

this[IdentifierTriple]

Gets or sets the IVersionable with the specified identifier.

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

The identifier of the item.

Property Value
Type Description
IVersionable

The IVersionable.

Methods

ContainsItem(IdentifierTriple)

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

Declaration
public virtual 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.

Remove(IdentifierTriple)

Remove an entry for the specified identifier.

Declaration
public virtual 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.

TryGetItem(IdentifierTriple, out IVersionable)

Gets the item from the cache, if it exists.

Declaration
public virtual 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.

TryGetItem<T>(IdentifierTriple, out T)

Gets the item from the cache, if it exists.

Declaration
public virtual 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.

Extension Methods

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