Share via


ModulePropertiesPage.ProcessProperties(PropertyBag) Method

Definition

When overridden in a derived class, returns the user-defined custom properties.

protected:
 abstract void ProcessProperties(Microsoft::Web::Management::Server::PropertyBag ^ properties);
protected abstract void ProcessProperties (Microsoft.Web.Management.Server.PropertyBag properties);
abstract member ProcessProperties : Microsoft.Web.Management.Server.PropertyBag -> unit
Protected MustOverride Sub ProcessProperties (properties As PropertyBag)

Parameters

properties
PropertyBag

The user-defined properties.

Examples

The following example creates the user's custom settings and saves them in the object that is specified by the TargetObject property.

internal class CustomPropertiesInfo : PropertyGridObject {

    private PropertyBag _bag;

    public CustomPropertiesInfo(
        ModulePropertiesPage page,
        PropertyBag bag)
        : base(page) {

        Initialize(bag);
    }

    public CustomPropertiesInfo(
        ModulePropertiesPage page,
        PropertyBag bag,
        bool bRO)
        : base(page, bRO) {

        Initialize(bag);
    }

    internal void Initialize(PropertyBag bag) {
        _bag = bag;
        TrcData();
    }

    bool GetBoolProp(SH.PropInt pi) {

        object o = _bag[pi.Indx];
        if (o == null)
            return false;

        return (bool)o;
    }
//
protected override void ProcessProperties(
    PropertyBag properties) {

    _bag = properties;
    _clone = _bag.Clone(ReadOnly);
    CustomPropertiesInfo info =
        (CustomPropertiesInfo)TargetObject;

    if (info == null) {
        info = new CustomPropertiesInfo(this, _clone);
        TargetObject = info;
    } else {
        info.Initialize(_clone);
    }

    ClearDirty();
}

Remarks

You should save user-defined custom properties in the object that is specified by the TargetObject property.

Applies to