HierarchyInfo.Refresh Method

Definition

Occurs when the Refresh command is called from the user interface (UI) or programmatically.

public:
 virtual void Refresh();
public virtual void Refresh ();
abstract member Refresh : unit -> unit
override this.Refresh : unit -> unit
Public Overridable Sub Refresh ()

Examples

The following example overrides the Refresh method. It uses a static variable so Parent.Refresh() is called every third refresh and base.Refresh() is called the other times. Each time base.Refresh() is called, the node name is changed to reflect the refresh count.

public override void Refresh()
{

    // Change node name to demonstrate Refresh 

    if (++SH._refreshCnt % 3 == 0)
    {
        // re-initialize this object
        Parent.Refresh();
    }

    // set node name to refect Refresh count
    _sNodeName = SH._name + SH._refreshCnt.ToString();
    base.Refresh();
}

Remarks

Call parent.Refresh() to reinitialize the object. Call base.Refresh() to refresh IIS Manager.

Applies to