Adds a setting override to the answer file for the component specified by an identity. Creates or returns an existing setting override specified by a path and a configuration pass. Internally, creates all parent overrides if necessary. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)

Usage

Visual Basic
Dim identity As Identity
Dim path As String
Dim configurationPass As ConfigurationPass
Dim createOption As CreateOptions
Dim returnValue As AnswerFileSettingOverride
Dim answerFileSettingOverrideCollection1 As AnswerFileSettingOverrideCollection
returnValue = answerFileSettingOverrideCollection1.Create(identity, path, configurationPass, createOption)

Syntax

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

Parameters

identity

Identity of the component

path

Path to the setting

configurationPass

Configuration pass

createOption

Enumeration element that determines whether to return the existing setting override or throw an exception when one already exists.

Return Value

An instance of SettingOverride.

Remarks

An exception from Troubleshooting System.InvalidOperationException Exceptions is thrown if there is already a setting override for the specified parameter.

System.ArgumentNullException is thrown if identity or path is null or empty.

System.InvalidOperationException is thrown if the override cannot be created (for example, if the maximum number of occurrences has been reached), or the setting override already exists and the value of CreateOptions is FailIfExists.


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