Show / Hide Table of Contents

Interface IItemFormatter

Provides methods to get information about a particular type of IVersionable item, and to serialize and deserialize items of that particular type.

Namespace: Algenta.Colectica.Model
Assembly: Algenta.Colectica.Model.dll
Syntax
public interface IItemFormatter

Methods

GetEnglishPluralLabelForItemType(Guid)

Gets a the English plural label for the specified type of item.

Declaration
string GetEnglishPluralLabelForItemType(Guid itemType)
Parameters
Type Name Description
Guid itemType

The type of item.

Returns
Type Description
string

A label for the specified item type.

GetImageNameForItemType16(Guid, out string)

Gets the image name for a 16x16 image representing items of the specified type.

Declaration
bool GetImageNameForItemType16(Guid itemType, out string imageName)
Parameters
Type Name Description
Guid itemType

The type of the item.

string imageName

The name of the 16x16 image.

Returns
Type Description
bool

true if an image can be provided; otherwise false.

GetImageNameForItemType32(Guid, out string)

Gets the image name for a 32x32 image representing items of the specified type.

Declaration
bool GetImageNameForItemType32(Guid itemType, out string imageName)
Parameters
Type Name Description
Guid itemType

The type of the item.

string imageName

The name of the 32x32 image.

Returns
Type Description
bool

true if an image can be provided; otherwise false.

GetItem(Guid, string, Collection<Note>, ItemCache, Guid)

Instantiates an IVersionable item by deserializing the provided representantation.

Declaration
IVersionable GetItem(Guid itemType, string representation, Collection<Note> itemNotes, ItemCache itemCache = null, Guid format = default)
Parameters
Type Name Description
Guid itemType

The type of the item to be created.

string representation

The representation: usually an xml element.

Collection<Note> itemNotes

The item notes.

ItemCache itemCache

The item cache.

Guid format

The format of the representation to be created, generally taken from RepositoryFormats.

Returns
Type Description
IVersionable

The instantiated IVersionable item.

GetLabelForItemType(Guid)

Gets a singular label for the specified type of item.

Declaration
string GetLabelForItemType(Guid itemType)
Parameters
Type Name Description
Guid itemType

The type of item.

Returns
Type Description
string

A label for the specified item type.

GetPluralLabelForItemType(Guid)

Gets a plural label for the specified type of item.

Declaration
string GetPluralLabelForItemType(Guid type)
Parameters
Type Name Description
Guid type

The type of item.

Returns
Type Description
string

A label for the specified item type.

GetReferencedTypes(Guid)

Gets an array of item types that can be referenced from the specified item type.

Declaration
Guid[] GetReferencedTypes(Guid itemType)
Parameters
Type Name Description
Guid itemType

The type of the item.

Returns
Type Description
Guid[]

An array of item types that can be referenced from the specified item type.

GetRepresentation(IVersionable, Guid)

Gets the XML representation for the specified item.

Declaration
string GetRepresentation(IVersionable item, Guid format = default)
Parameters
Type Name Description
IVersionable item

The item for which a representation should be created.

Guid format

The format of the representation to be created, generally taken from RepositoryFormats.

Returns
Type Description
string

GetSortOrder(Guid)

Gets the sort order of the specified item type. Lower numbers are sorted before higher numbers.

Declaration
int GetSortOrder(Guid itemType)
Parameters
Type Name Description
Guid itemType

Type of the item.

Returns
Type Description
int

The sort order of the specified item type.

GetTextExtract(IVersionable)

Gets a list of the ItemTextExtract extracts from the specified item. These extracts are used for full text indexing.

Declaration
Collection<ItemTextExtract> GetTextExtract(IVersionable item)
Parameters
Type Name Description
IVersionable item

The item from which extracts are created.

Returns
Type Description
Collection<ItemTextExtract>

A list of extracts.

GetTypeForItemType(Guid)

Gets the .NET type for the specified item type.

Declaration
Type GetTypeForItemType(Guid itemType)
Parameters
Type Name Description
Guid itemType

The type of the item.

Returns
Type Description
Type

The .NET type for the specified item type.

SupportedItems()

Gets a list of item types about which this class can provide information.

Declaration
List<Guid> SupportedItems()
Returns
Type Description
List<Guid>

The list of item types about which this class can provide information.

SupportsItem(Guid)

Determines whether this class can provide information about an item with the specified type.

Declaration
bool SupportsItem(Guid itemType)
Parameters
Type Name Description
Guid itemType

The type of the item for which information is being queried.

Returns
Type Description
bool

true if this class can provide information about the specified item type; otherwise false.

Extension Methods

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