Creates SourcePath within the collection. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)

Usage

Visual Basic
Dim path As String
Dim createOption As CreateOptions
Dim returnValue As SourcePath
Dim sourcePathCollection1 As SourcePathCollection
returnValue = sourcePathCollection1.Create(path, createOption)

Syntax

Visual Basic
Public Function Create( _
		ByVal path As String, _
		ByVal createOption As CreateOptions _
) As SourcePath
C#
public SourcePath Create(
		string path, 
		CreateOptions createOption
);
C++
public:
SourcePath^ Create(
		String^ path,
		CreateOptions createOption
);
J#
public SourcePath Create(
		System.String path, 
		CreateOptions createOption
);
JScript
public function Create(
		 path : String, 
		 createOption : CreateOptions
) : SourcePath;

Parameters

path

Path of the package file.

createOption

Enumeration element that determines whether to return the existing source path or throw an exception if one already exists.

Return Value

An instance of SourcePath.

Remarks

ArgumentNullException is thrown if path is null or empty.

InvalidOperationException is thrown if there is already a SourcePath for path and createOption equals FailIfExists.

The newly created instance will always be inserted at the beginning of the collection and so will represent the primary source path of the package. See PrimarySourcePath.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista, and Windows 2000

Target Platforms

See Also