System.Web.Compilation.AssemblyBuilder.CreateEmbeddedResource Method

Allows a build provider to create a resource file to include in the assembly compilation.

Syntax

public System.IO.Stream CreateEmbeddedResource (BuildProvider buildProvider, string name)

Parameters

buildProvider
The build provider generating the resource.
name
The name of the resource file to be created.

Returns

An open System.IO.Stream that can be used to write resources, which are included in the assembly compilation.

Remarks

After calling the AssemblyBuilder.CreateEmbeddedResource(BuildProvider, string) method, a System.Web.Compilation.BuildProvider object writes the resource file contents using the returned System.IO.Stream object. For example, the build provider can write the resources using a System.Resources.ResourceWriter object. After writing the resource file, the build provider must use the System.IO.Stream.Close method to close the System.IO.Stream object and free associated system resources.

Requirements

Namespace: System.Web.Compilation
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0