Share via


ModulePageIdentifierAttribute(String) Constructor

Definition

Initializes a new instance of the ModulePageIdentifierAttribute class.

public:
 ModulePageIdentifierAttribute(System::String ^ guid);
public ModulePageIdentifierAttribute (string guid);
new Microsoft.Web.Management.Client.ModulePageIdentifierAttribute : string -> Microsoft.Web.Management.Client.ModulePageIdentifierAttribute
Public Sub New (guid As String)

Parameters

guid
String

The string representation of a GUID.

Examples

The following example creates a ModulePageIdentifierAttribute object and sends the value of the Guid property to the trace listener.

protected override Guid PreferenceKey {
    get {
        object[] attrs = GetType().
            GetCustomAttributes(
            typeof(ModulePageIdentifierAttribute), 
            false);
        if (attrs.Length > 0) {
            ModulePageIdentifierAttribute
                modulePageIdentifierAttr = 
                (ModulePageIdentifierAttribute)attrs[0];
            return modulePageIdentifierAttr.Guid;
        }

        return Guid.Empty;
    }
} 

Applies to