Class VersionableExtensions
Provides various extension methods useful for working with IVersionable items.
Inheritance
System.Object
VersionableExtensions
Namespace: Algenta.Colectica.Model.Utility
Assembly: Algenta.Colectica.Model.Ddi.dll
Syntax
public static class VersionableExtensions : object
Methods
GetHeader(IVersionable)
Gets a display label for the item, based on the item's content.
Declaration
public static string GetHeader(this IVersionable item)
Parameters
Type | Name | Description |
---|---|---|
IVersionable | item | The item. |
Returns
Type | Description |
---|---|
System.String |
GetMetadata(IVersionable)
Gets a description of the item.
Declaration
public static RepositoryItemMetadata GetMetadata(this IVersionable item)
Parameters
Type | Name | Description |
---|---|---|
IVersionable | item | The item. |
Returns
Type | Description |
---|---|
RepositoryItemMetadata |
GetUserAttribute(IVersionable, String)
Gets the value of a UserAttributePair.
Declaration
public static CodeValue GetUserAttribute(this IVersionable item, string key)
Parameters
Type | Name | Description |
---|---|---|
IVersionable | item | |
System.String | key |
Returns
Type | Description |
---|---|
CodeValue |
GetUserAttributeInt(IVersionable, String)
Gets an integer user attribute of an item.
Declaration
public static int ? GetUserAttributeInt(this IVersionable item, string key)
Parameters
Type | Name | Description |
---|---|---|
IVersionable | item | |
System.String | key |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
SetUserAttribute(IVersionable, String, String)
Sets a UserAttributePair on the item.
Declaration
public static void SetUserAttribute(this IVersionable item, string key, string value)
Parameters
Type | Name | Description |
---|---|---|
IVersionable | item | |
System.String | key | |
System.String | value |