Table of Contents

Class GlobalConfigProperty

Namespace
Dassie.Extensions
Assembly
dc.dll

Represents a global configuration property defined by an extension.

public abstract class GlobalConfigProperty
Inheritance
GlobalConfigProperty
Inherited Members
Extension Methods

Properties

DefaultValue

The default value of the property.

public virtual object DefaultValue { get; }

Property Value

object

Name

The name of the property. Properties are automatically namespaced using the identifier of the containing extension.

public abstract string Name { get; }

Property Value

string

Type

The data type of the property.

public abstract GlobalConfigDataType Type { get; }

Property Value

GlobalConfigDataType

Validators

An array of validation delegates that are invoked every time the property is set. The parameter of the validator represents the new value of the property. The return value of the validator should indicate wheter or not the specified property value is valid. In case of failure, the validator should handle the emission of error messages itself. If one of the validators returns false, the set operation is aborted and none of the remaining validators are invoked.

public virtual Func<object, bool>[] Validators { get; }

Property Value

Func<object, bool>[]

Methods

GetValue()

Gets the current value of the global property.

public object GetValue()

Returns

object

The current value of the property.

Exceptions

InvalidOperationException

SetValue(object)

Sets the value of the global property.

public void SetValue(object value)

Parameters

value object

The new value of the property.

Exceptions

InvalidOperationException