Class LoadOptions
Contents
[
Hide
]LoadOptions class
Allows to specify additional load parameters when loading a project from file or stream.
public class LoadOptions
Constructors
| Name | Description | 
|---|---|
| LoadOptions() | Initializes a new instance of the LoadOptionsclass. | 
Properties
| Name | Description | 
|---|---|
| CancellationToken { get; set; } | Gets or sets a token which can be used to cancel a project loading operation. | 
| Encoding { get; set; } | Gets or sets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats. The default encoding is UTF8. | 
| ErrorHandler { get; set; } | Gets or sets a callback method to handle xml parse errors. | 
| Password { get; set; } | Gets or sets a protection password. | 
| PrimaveraReadOptions { get; set; } | Gets or sets a specified instance of the PrimaveraReadOptionsclass which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml). | 
Examples
Shows how to load the password-protected project using <see cref=“Aspose.Tasks.LoadOptions”/> instance.
using (var stream = new FileStream(DataDir + "PasswordProtectedProject.mpp", FileMode.Open))
{
    var options = new LoadOptions
    {
        Password = "password"
    };
    var project = new Project(stream, options);
    Console.WriteLine(project.Get(Prj.Name));
}
See Also
- namespace Aspose.Tasks
- assembly Aspose.Tasks