BuildProvider.GetCustomString Method (CompilerResults)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Generates a string to be persisted in the compiled assembly.

Namespace:   System.Web.Compilation
Assembly:  System.Web (in System.Web.dll)

public virtual string GetCustomString(
	CompilerResults results


Type: System.CodeDom.Compiler.CompilerResults

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

Return Value

Type: System.String

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

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.

.NET Framework
Available since 2.0
Return to top