ServerManagementUnit.Scope Property

Definition

Gets the scope of the server management unit.

public:
 virtual property Microsoft::Web::Management::Server::ManagementScope Scope { Microsoft::Web::Management::Server::ManagementScope get(); };
public override Microsoft.Web.Management.Server.ManagementScope Scope { get; }
member this.Scope : Microsoft.Web.Management.Server.ManagementScope
Public Overrides ReadOnly Property Scope As ManagementScope

Property Value

One of the ManagementScope values. The value is Server in all cases.

Examples

The following example sends ServerManagementUnit information to the trace listener.

void traceMU() {

    ServerManagementUnit smu = ManagementUnit as ServerManagementUnit;

    if (smu != null) {
        string FMV = smu.FrameworkVersions.ToString();
        Trace.WriteLine("FrameworkVersions = " + FMV);
        Trace.WriteLine("MachineName = " + smu.MachineName);
        ApplicationManagementUnit amu =
            smu.GetApplication("rickaSite", "/ra");
        Trace.WriteLine("App FrameworkVersion = "
            + amu.FrameworkVersion.Text);
        SiteManagementUnit rickaSMU = smu.GetSite("rickaSite");
        string rwcp = rickaSMU.ConfigurationMap.RootWebConfigurationPath;
        Trace.WriteLine("RootWebConfigurationPath = " + rwcp);
        ManagementScope ms = smu.Scope;
        Trace.WriteLine("Scope = " + ms.ToString());


    } else {

        ApplicationManagementUnit appUnit = 
            ManagementUnit as ApplicationManagementUnit;
        if (appUnit != null)
            traceAppUnit();
    }

} 

Applies to