Share via


HierarchyProvider.GetChildren(HierarchyInfo) Method

Definition

Returns the child nodes to the hierarchy service.

public:
 abstract cli::array <Microsoft::Web::Management::Client::HierarchyInfo ^> ^ GetChildren(Microsoft::Web::Management::Client::HierarchyInfo ^ item);
public abstract Microsoft.Web.Management.Client.HierarchyInfo[] GetChildren (Microsoft.Web.Management.Client.HierarchyInfo item);
abstract member GetChildren : Microsoft.Web.Management.Client.HierarchyInfo -> Microsoft.Web.Management.Client.HierarchyInfo[]
Public MustOverride Function GetChildren (item As HierarchyInfo) As HierarchyInfo()

Parameters

item
HierarchyInfo

The HierarchyInfo object to add.

Returns

A HierarchyInfo object to add to the Connections pane in IIS Manager.

Examples

The following example implements the GetChildren method.

public override HierarchyInfo[] GetChildren(HierarchyInfo item) {

    Trace.WriteLine("NodeType = " + item.NodeType +
        "\t name = " + this.ToString());
    // if we are at the Server level, add our node
    if (item.NodeType == HierarchyInfo.ServerConnection) {
        if (_info == null) {
            _info = new DemoHierarchyInfo(this);
        }
        return new HierarchyInfo[] { _info };
    }

    return null;
} 

Remarks

You should check the Microsoft.Web.Management.Client.HierarchyInfo.NodeType property to verify that the child node is added at the correct node.

Applies to