Class ItemCache
Represents a cache of repository items.
Inherited Members
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 |
|
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 |
|
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 |
|
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 |
|
Type Parameters
Name | Description |
---|---|
T | The type of the item. |