Class Task
Represents a task item (IPM.Task), extending Message with task-specific properties defined in [MS-OXOTASK].
Inherited Members
Namespace: DRIT.Mail.Mapi.API
Assembly: DRIT.Mail.dll
Syntax
public class Task : Message
Constructors
View SourceTask(MapiTask)
Initialises a new instance of Task backed by the given MAPI task node.
Declaration
public Task(MapiTask mapiTask)
Parameters
| Type | Name | Description |
|---|---|---|
| MapiTask | mapiTask | The underlying MAPI task property accessor. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |
Properties
View SourceActualWork
Gets or sets the actual number of minutes the user has worked on the task.
Declaration
public int? ActualWork { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Remarks
Must be between 0 and 1,525,252,319 inclusive. Reference: MS-OXOTASK 2.2.2.2.6 PidLidTaskActualEffort Property
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown when the value is outside the valid range. |
AssignmentState
Gets or sets the assignment state of the task (not assigned, assignee's copy, assigner's copy, or conflict).
Declaration
public TaskState? AssignmentState { get; set; }
Property Value
| Type | Description |
|---|---|
| TaskState? |
Remarks
Reference: MS-OXOTASK 2.2.2.2.10 PidLidTaskState Property
DateCompleted
Gets or sets the date on which the user completed the task.
Declaration
public DateTime? DateCompleted { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
Remarks
Reference: MS-OXOTASK 2.2.2.2.11 PidLidTaskDateCompleted Property
DueDate
Gets or sets the date by which the user expects to finish the task. Returns null when the underlying value is the "no date" sentinel.
Declaration
public DateTime? DueDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
Remarks
Reference: MS-OXOTASK 2.2.2.2.9 PidLidTaskDueDate Property
EstimatedWork
Gets or sets the estimated number of minutes the user expects to work on the task.
Declaration
public int? EstimatedWork { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Remarks
Must be between 0 and 1,525,252,319 inclusive. Reference: MS-OXOTASK 2.2.2.2.5 PidLidTaskEstimatedEffort Property
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown when the value is outside the valid range. |
LastUpdate
Gets the date and time of the most recent change to this task. Updated automatically by Save().
Declaration
public DateTime? LastUpdate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
Remarks
Reference: MS-OXOTASK 2.2.2.2.22 PidLidTaskLastUpdate Property
PercentComplete
Gets or sets a value that indicates the progress the user has made on a task.
Declaration
public double? PercentComplete { get; set; }
Property Value
| Type | Description |
|---|---|
| double? |
Remarks
The value MUST be a number greater than or equal to 0.0 and less than or equal to 1.0, where 1.0 indicates that work is completed and 0.0 indicates that work has not begun.
Reference: MS-OXOTASK 2.2.2.2.3 PidLidPercentComplete Property
StartDate
Gets or sets the date on which the user expects to begin the task. Returns null when the underlying value is the "no date" sentinel.
Declaration
public DateTime? StartDate { get; set; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
Remarks
Reference: MS-OXOTASK 2.2.2.2.8 PidLidTaskStartDate Property
Status
Gets or sets the completion status of the task. Setting to Completed automatically sets PercentComplete to 1; setting to NotStarted resets it to 0.
Declaration
public TaskStatus? Status { get; set; }
Property Value
| Type | Description |
|---|---|
| TaskStatus? |
Remarks
Reference: MS-OXOTASK 2.2.2.2.2 PidLidTaskStatus Property
Methods
View SourceCreateNew(MapiTask)
Creates a new Task with default property values applied.
Declaration
public static Task CreateNew(MapiTask mapiTask)
Parameters
| Type | Name | Description |
|---|---|---|
| MapiTask | mapiTask | The underlying MAPI task node. |
Returns
| Type | Description |
|---|---|
| Task | A new Task instance with default values set. |
Save()
Saves property changes and updates LastUpdate to the current time.
Declaration
public override void Save()
Overrides
View SourceSetDefaultValues()
Sets the default values.
Declaration
protected override void SetDefaultValues()