Class MapiTask
Contents
[
Hide
]MapiTask class
Represents a MAPI task item.
public class MapiTask : MapiMessageItemBase
Constructors
| Name | Description | 
|---|---|
| MapiTask() | Initializes a new instance of the MapiTaskclass. | 
| MapiTask(string, string, DateTime, DateTime) | Initializes a new instance of the MapiTaskclass. | 
Properties
| Name | Description | 
|---|---|
| AcceptanceState { get; set; } | Gets or sets the acceptance state of the task. | 
| ActualEffort { get; set; } | Gets or sets the number of minutes that the user actually spent working on a task. | 
| Attachments { get; } | Gets the attachments collection. | 
| Billing { get; set; } | Contains the billing information associated with an item. | 
| Body { get; set; } | Gets the message text. | 
| BodyHtml { get; } | Gets the BodyRtfof the message converted to HTML, if present, otherwise an empty string. | 
| BodyRtf { get; set; } | Gets or sets the RTF formatted message text. | 
| BodyType { get; } | Gets the type of the body. | 
| Categories { get; set; } | Contains keywords or categories for the message object. | 
| virtual CodePage { get; } | Gets the code page. | 
| Companies { get; set; } | Contains the names of the companies that are associated with an item. | 
| DateCompleted { get; set; } | Gets or sets the date when the user completed work on the task. | 
| DueDate { get; set; } | Gets or sets the date by which the user expects work on the task to be complete. | 
| EstimatedEffort { get; set; } | Gets or sets the number of minutes that the user expects to work on a task. | 
| Flags { get; } | Gets the indication flags of the Task object. | 
| History { get; set; } | Gets or sets the type of change that was last made to the Task object. | 
| virtual ItemId { get; } | The item id, uses with a server | 
| LastUpdate { get; set; } | Gets or sets the date and time of the most recent change made to the Task object. | 
| MessageClass { get; set; } | Gets a case-sensitive string that identifies the sender-defined message class, such as IPM.Note. The message class specifies the type, purpose, or content of the message. | 
| Mileage { get; set; } | Contains the mileage information that is associated with an item. | 
| Mode { get; set; } | Gets or sets the assignment status of the Task object. | 
| NamedProperties { get; } | Gets the named properties of message. | 
| NamedPropertyMapping { get; } | Gets the named property mapping. | 
| PercentComplete { get; set; } | Gets or sets the progress the user has made on a task. | 
| Priority { get; set; } | Gets or sets the current Priority of the Task object. | 
| virtual Properties { get; } | Gets the collection of properties. | 
| PropertyStream { get; } | Gets the property stream. | 
| Recipients { get; set; } | Gets the recipients of the message. | 
| Recurrence { get; set; } | Gets or sets the recurrence properties. | 
| ReminderFileParameter { get; set; } | Specifies the full path of the sound that a client SHOULD play when the reminder becomes overdue. | 
| ReminderSet { get; set; } | Gets or sets a value indicating whether a reminder is set on the object | 
| ReminderTime { get; set; } | Gets or sets the initial signal time for a reminder | 
| Sensitivity { get; set; } | Gets the Sensitivity. | 
| StartDate { get; set; } | Gets or sets the date on which the user expects work on the task to begin. | 
| State { get; set; } | Gets or sets the current assignment state of the Task object. | 
| Status { get; set; } | Gets or sets the status of the user’s progress on the task. | 
| Subject { get; set; } | Gets or sets the subject of the message. | 
| SubjectPrefix { get; } | Gets a subject prefix that typically indicates some action on a message, such as “FW: " for forwarding. | 
| SubStorages { get; } | Gets the sub storages. | 
| SupportedType { get; } | Gets the supported item type. | 
| Users { get; set; } | Gets or sets information about task users. | 
Methods
| Name | Description | 
|---|---|
| static FromVTodo(Stream) | Creates an instance of MapiTask from the specified stream. | 
| static FromVTodo(string) | Creates an instance of MapiTask from the specified .ics file. | 
| static FromVTodo(Stream, bool) | Creates an instance of MapiTask from the specified stream. | 
| static FromVTodo(string, bool) | Creates an instance of MapiTask from the specified .ics file. | 
| virtual Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | 
| override GetProperty(PropertyDescriptor) | Gets MAPI property by property descriptor. | 
| GetPropertyBoolean(long) | Gets the value of the property specified by tag as Boolean type. | 
| GetPropertyBytes(long) | Gets the string value of the property specified by tag. | 
| GetPropertyDateTime(long) | Gets the value of the property specified by tag as DateTime type. | 
| GetPropertyInt32(long) | Gets the int32 value of the property specified by tag. | 
| GetPropertyLong(long) | Gets the value of the property specified by tag as Long (int64) type. | 
| GetPropertyShort(long) | Gets the value of the property specified by tag as Short type. | 
| GetPropertyString(long) | Gets the string value of the property specified by tag. | 
| GetPropertyString(long, int) | Gets the string value of the property specified by tag. | 
| GetUnderlyingMessage() | Retrieves the underlying MapiMessage object. | 
| IsStoreUnicodeOk() | Determines if string properties are Unicode encoded or not. | 
| RemoveProperty(long) | Provides correctly removing property from all collections. | 
| Save(Stream, TaskSaveFormat) | Saves this MapiTaskto the given stream using specified format. | 
| Save(string, TaskSaveFormat) | Saves this MapiTaskinto file using specified format. | 
| virtual SetBodyContent(string, BodyContentType) | Sets the content of the body. | 
| virtual SetBodyContent(string, BodyContentType, bool) | Sets the content of the body. | 
| SetBodyRtf(string, bool) | Gets or sets the RTF formatted message text. | 
| SetMessageFlags(MapiMessageFlags) | Sets the message flags. | 
| virtual SetProperty(MapiProperty) | Sets the property. | 
| override SetProperty(PropertyDescriptor, object) | Sets MAPI property. | 
| TryGetPropertyData(long) | Try to get the property data with specified tag key. | 
| TryGetPropertyDateTime(long, ref DateTime) | Gets the value of the specified property as DateTime type. A return value indicates whether the operation succeeded. | 
| TryGetPropertyInt32(long, ref int) | Gets the value of the specified property as Int32 type. A return value indicates whether the operation succeeded. | 
| TryGetPropertyLong(long, ref long) | Gets the value of the specified property as Long type. A return value indicates whether the operation succeeded. | 
| TryGetPropertyString(long) | Try to get a property data as string with specified tag. | 
| TryGetPropertyString(long, int) | Try to get a property data as string with specified tag and code page. | 
| TryGetPropertyString(long, ref string) | Gets the value of the specified property as String type. A return value indicates whether the operation succeeded. | 
| TryGetPropertyString(long, ref string, int) | Gets the value of the specified property as String type. A return value indicates whether the operation succeeded. | 
Remarks
This class serves as a wrapper for MapiMessage to simplify the process of handling task information from MAPI properties. It provides a more intuitive interface for accessing and manipulating task data within the MAPI message.
Examples
The following example demonstrates how to get a MapiTask object from a MapiMessage.
[C#]
var msg = MapiMessage.Load("task.msg");
// Check if the loaded message is a supported task type
if (msg.SupportedType == MapiItemType.Task)
{
    // Convert the MAPI message to a MapiTask object
    var mapiTask = (MapiTask)msg.ToMapiMessageItem();
    
    // Display some task info
    Console.WriteLine(mapiTask.Subject);
    Console.WriteLine(mapiTask.DueDate);
}
[Visual Basic]
Dim msg = MapiMessage.Load("task.msg")
' Check if the loaded message is a supported task type
If msg.SupportedType = MapiItemType.Task Then
    ' Convert the MAPI message to a MapiTask object
    Dim mapiTask = DirectCast(msg.ToMapiMessageItem(), MapiTask)
    
    ' Display some task info
    Console.WriteLine(mapiTask.Subject)
    Console.WriteLine(mapiTask.DueDate)
End If
See Also
- class MapiMessageItemBase
- namespace Aspose.Email.Mapi
- assembly Aspose.Email