Class ItemCache
Represents a cache of repository items.
Inheritance
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.dll
Syntax
public class ItemCache : object
Properties
Item[IdentifierTriple]
Gets or sets the IVersionable with the specified identifier.
Declaration
public 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 bool ContainsItem(IdentifierTriple triple)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | triple | The identifer. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remove(IdentifierTriple)
Remove an entry for the specified identifier.
Declaration
public bool Remove(IdentifierTriple triple)
Parameters
Type | Name | Description |
---|---|---|
IdentifierTriple | triple | The identifer. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryGetItem(IdentifierTriple, out IVersionable)
Gets the item from the cache, if it exists.
Declaration
public 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 |
---|---|
System.Boolean |
|
TryGetItem<T>(IdentifierTriple, out T)
Gets the item from the cache, if it exists.
Declaration
public 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 |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The type of the item. |