NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

AssemblyBuilder.DefineResource (String, String, String, ResourceAttributes)

Defines a standalone managed resource for this assembly. Attributes can be specified for the managed resource.

[Visual Basic]
Overloads Public Function DefineResource( _
   ByVal name As String, _
   ByVal description As String, _
   ByVal fileName As String, _
   ByVal attribute As ResourceAttributes _
) As ResourceWriter
[C#]
public ResourceWriter DefineResource(
   string name,
   string description,
   string fileName,
   ResourceAttributes attribute
);
[C++]
public: ResourceWriter* DefineResource(
   String* name,
   String* description,
   String* fileName,
   ResourceAttributes attribute
);
[JScript]
public function DefineResource(
   name : String,
   description : String,
   fileName : String,
   attribute : ResourceAttributes
) : ResourceWriter;

Parameters

name
The logical name of the resource.
description
A textual description of the resource.
fileName
The physical file name (.resources file) to which the logical name is mapped.
attribute
The resource attributes.

Return Value

A ResourceWriter object for the specified resource.

Exceptions

Exception Type Condition
ArgumentException If name has been previously defined

Remarks

Fine-grain resources can be added with the returned ResourceWriter by calling AddResource.

Filename should not be the same as that of any other persistable module, standalone managed resource, or the standalone manifest file.

Requirements

NGWS Runtime Security:

ReflectionPermission SecurityAction.Demand, ReflectionEmit=true

See Also

AssemblyBuilder Class | AssemblyBuilder Members | System.Reflection.Emit Namespace | AssemblyBuilder.DefineResource Overload List