Class TodoItem¶
Namespace: MyApp.Domain
Assembly: MyApp.Domain.dll
A single todo item in the example application.
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
TodoItem(Guid, string, bool)¶
A single todo item in the example application.
Parameters¶
Id Guid
The stable identifier of the item.
Title string
The human-readable title of the item.
IsCompleted bool
A value indicating whether the item is done.
Properties¶
Id¶
The stable identifier of the item.
Property Value¶
IsCompleted¶
A value indicating whether the item is done.
Property Value¶
Title¶
The human-readable title of the item.
Property Value¶
Methods¶
Create(string)¶
Creates a new, uncompleted todo item with a fresh identifier.
Parameters¶
title string
The title of the item.
Returns¶
A new
Exceptions¶
Thrown when title is null or whitespace.
WithCompletion(bool)¶
Returns a copy of this item marked as completed or uncompleted.
Parameters¶
isCompleted bool
The new completion state.
Returns¶
A new