Rediger

Del via


BuildProvider.GetCustomString(CompilerResults) Method

Definition

Generates a string to be persisted in the compiled assembly.

public:
 virtual System::String ^ GetCustomString(System::CodeDom::Compiler::CompilerResults ^ results);
public virtual string GetCustomString (System.CodeDom.Compiler.CompilerResults results);
abstract member GetCustomString : System.CodeDom.Compiler.CompilerResults -> string
override this.GetCustomString : System.CodeDom.Compiler.CompilerResults -> string
Public Overridable Function GetCustomString (results As CompilerResults) As String

Parameters

results
CompilerResults

The compilation results for the build provider's virtual path.

Returns

A string to be persisted in the build environment, or null if the BuildProvider instance does not implement GetCustomString(CompilerResults).

Remarks

The GetCompiledCustomString method of a BuildManager object creates an instance of a build provider for an input virtual path, and calls the GetCustomString method on the BuildProvider object.

The base BuildProvider class returns null for the GetCustomString method, indicating that GetCustomString is not implemented.

Certain build provider implementations can implement GetCustomString in place of the GetGeneratedType method. A BuildProvider object typically uses GetGeneratedType to return a Type object for a virtual path. However, the GetCustomString method can be used to indicate that a BuildProvider object can generate multiple types from a virtual path.

Applies to

See also