ServerManagementUnit.FrameworkVersions 屬性

定義

取得目前管理單位內容的已安裝.NET Framework版本。

public:
 property System::Collections::ICollection ^ FrameworkVersions { System::Collections::ICollection ^ get(); };
public System.Collections.ICollection FrameworkVersions { get; }
member this.FrameworkVersions : System.Collections.ICollection
Public ReadOnly Property FrameworkVersions As ICollection

屬性值

ICollection包含 物件集合的 ManagementFrameworkVersion 介面。

範例

下列範例會將資訊傳送 ServerManagementUnit 至追蹤接聽程式。

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();
    }

} 

適用於