Creates a new project from a project package.
Namespace: Sdl.ProjectAutomation.FileBasedAssembly: Sdl.ProjectAutomation.FileBased (in Sdl.ProjectAutomation.FileBased.dll) Version: 1.0.0.0 (1.2.3064.0)
Syntax
C# |
---|
public static FileBasedProject CreateFromProjectPackage( string projectPackageFilePath, string projectFolder, EventHandler<ProgressEventArgs> statusEventHandler, EventHandler<MessageEventArgs> messageEventHandler, out ProjectPackageImport result ) |
Visual Basic |
---|
Public Shared Function CreateFromProjectPackage ( _ projectPackageFilePath As String, _ projectFolder As String, _ statusEventHandler As EventHandler(Of ProgressEventArgs), _ messageEventHandler As EventHandler(Of MessageEventArgs), _ <OutAttribute> ByRef result As ProjectPackageImport _ ) As FileBasedProject |
Visual C++ |
---|
public: static FileBasedProject^ CreateFromProjectPackage( String^ projectPackageFilePath, String^ projectFolder, EventHandler<ProgressEventArgs^>^ statusEventHandler, EventHandler<MessageEventArgs^>^ messageEventHandler, [OutAttribute] ProjectPackageImport^% result ) |
Parameters
- projectPackageFilePath
- Type: System..::..String
The file path of the project package to open into a new project.
- projectFolder
- Type: System..::..String
The file path of an empty folder to create the new project in.
- statusEventHandler
- Type: System..::..EventHandler<(Of <(<'ProgressEventArgs>)>)>
Event handler for package creation status events. Can be null.
- messageEventHandler
- Type: System..::..EventHandler<(Of <(<'MessageEventArgs>)>)>
Event handler for message events. Can be null.
- result
- Type: Sdl.ProjectAutomation.Core..::..ProjectPackageImport%
Information about the project package import operation.
Return Value
The newly created file-based project; or null if the package import failed.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | Thrown when projectFolder or projectPackageFilePath are null or empty. |
System.IO..::..FileNotFoundException | Thrown when projectPackageFilePath does not exist. |
System..::..ArgumentException | Thrown when projectFolder refers to a non-empty directory. |