Class TrackableItem<T>
Represents an item with versioning and state tracking capabilities.
Inherited Members
Namespace: Coree.NETASP.UnderConstruction
Assembly: Coree.NETASP.dll
Syntax
public class TrackableItem<T>
Type Parameters
Name | Description |
---|---|
T | The type of the item. |
Constructors
| Edit this page View SourceTrackableItem(T)
Initializes a new instance of the TrackableItem<T> class with the specified item.
Declaration
public TrackableItem(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to be versioned. |
Properties
| Edit this page View SourceItem
Gets or sets the item.
Declaration
public T Item { get; set; }
Property Value
Type | Description |
---|---|
T |
LastModified
Gets the version timestamp of the item.
Declaration
public DateTime LastModified { get; }
Property Value
Type | Description |
---|---|
DateTime |
State
Gets the state of the item.
Declaration
public TrackableState State { get; }
Property Value
Type | Description |
---|---|
TrackableState |
Methods
| Edit this page View SourceUpdateDate(DateTime)
Sets the version date of the item.
Declaration
public void UpdateDate(DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
DateTime | dateTime | The version date to set. |
UpdateState(TrackableState)
Sets the state of the item.
Declaration
public void UpdateState(TrackableState state)
Parameters
Type | Name | Description |
---|---|---|
TrackableState | state | The new state of the item. |
UpdateStateAndDate(TrackableState, DateTime)
Sets the state and version date of the item.
Declaration
public void UpdateStateAndDate(TrackableState state, DateTime dateTime)
Parameters
Type | Name | Description |
---|---|---|
TrackableState | state | The new state of the item. |
DateTime | dateTime | The version date to set. |
Operators
| Edit this page View Sourceexplicit operator T(TrackableItem<T>)
Defines an explicit conversion of a TrackableItem<T> to its underlying item of type T
.
Declaration
public static explicit operator T(TrackableItem<T> trackableItem)
Parameters
Type | Name | Description |
---|---|---|
TrackableItem<T> | trackableItem | The TrackableItem<T> to convert. |
Returns
Type | Description |
---|---|
T |
implicit operator TrackableItem<T>(T)
Defines an implicit conversion of an item of type T
to a TrackableItem<T>.
Declaration
public static implicit operator TrackableItem<T>(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to convert to a TrackableItem<T>. |
Returns
Type | Description |
---|---|
TrackableItem<T> |