Click or drag to resize

EmbeddedResourceFileAttribute Class

Attribute indicating the location of an embedded resource that should be served by the EmbeddedResourcePathProvider.
Inheritance Hierarchy
SystemObject
  SystemAttribute
    GSF.Web.HostingEmbeddedResourceFileAttribute

Namespace: GSF.Web.Hosting
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.181-beta
Syntax
[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class EmbeddedResourceFileAttribute : Attribute
View Source

The EmbeddedResourceFileAttribute type exposes the following members.

Constructors
 NameDescription
Public methodCode exampleEmbeddedResourceFileAttribute Initializes a new instance of the EmbeddedResourceFileAttribute class.
Top
Properties
 NameDescription
Public propertyResourceNamespace Gets the namespace for the embedded resource.
Public propertyResourcePath Gets the path to the embedded resource.
Public propertyTypeIdWhen implemented in a derived class, gets a unique identifier for this Attribute.
(Inherited from Attribute)
Top
Methods
 NameDescription
Public methodEqualsReturns a value that indicates whether this instance is equal to a specified object.
(Inherited from Attribute)
Public methodGetHashCodeReturns the hash code for this instance.
(Inherited from Attribute)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsDefaultAttributeWhen overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
(Inherited from Attribute)
Public methodMatchWhen overridden in a derived class, returns a value that indicates whether this instance equals a specified object.
(Inherited from Attribute)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks

This attribute is used by the EmbeddedResourcePathProvider module/path provider to retrieve the list of embedded resources from an assembly that should be considered a part of the virtual filesystem.

Example

Below is an example of what it might look like to embed a web form and a user control in an assembly to be served up with the EmbeddedResourcePathProvider:

C#
[assembly: EmbeddedResourceFileAttribute("MyNamespace.WebForm1.aspx", "MyNamespace")]
[assembly: EmbeddedResourceFileAttribute("MyNamespace.UserControl1.ascx", "MyNamespace")]
See Also