LoadOptions class

Allows to specify additional load parameters when loading a project from file or stream.

public class LoadOptions


Name Description
LoadOptions() Initializes a new instance of the LoadOptions class.


Name Description
CancellationToken { get; set; } Gets or sets a token which can be used to cancel a project loading operation.
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 PrimaveraReadOptions class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml).


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);

See Also