Click or drag to resize

EmbeddedResourceFileAttribute Constructor

Initializes a new instance of the EmbeddedResourceFileAttribute class.

Namespace: GSF.Web.Hosting
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.218-beta
Syntax
public EmbeddedResourceFileAttribute(
	string resourcePath,
	string resourceNamespace
)
View Source

Parameters

resourcePath  String
The path to the embedded resource. Used to get the resource as a stream from the assembly.
resourceNamespace  String
The namespace the resource is in. This will generally be removed from the full resource path to calculate the "application path" for the embedded resource.
Exceptions
ExceptionCondition
ArgumentNullException Thrown if resourcePath or resourceNamespace is .
ArgumentOutOfRangeException Thrown if resourcePath is Empty or if it only consists of periods and/or spaces.
Remarks

Both resourcePath and resourceNamespace will be processed to have leading and trailing periods and spaces removed. If resourcePath ends up being empty, an ArgumentOutOfRangeException is thrown. No exception is thrown if resourceNamespace turns out empty.

Example

If the resourcePath is RootNS.SubNS.AppRoot.Folder.File.aspx and the resourceNamespace is RootNS.SubNS.AppRoot, the virtual "path" to the embedded file will be Folder.File.aspx (which will be converted by the EmbeddedResourcePathProvider to ~/Folder/File.aspx).

See Also