Pip-Services-Commons-Dotnet
Public Member Functions | List of all members
PipServices3.Commons.Config.IConfigurable Interface Reference

An interface to set configuration parameters to an object. More...

Inheritance diagram for PipServices3.Commons.Config.IConfigurable:
PipServices3.Commons.Config.IReconfigurable PipServices3.Commons.Refer.DependencyResolver

Public Member Functions

void Configure (ConfigParams config)
 Configures object by passing configuration parameters. More...
 

Detailed Description

An interface to set configuration parameters to an object.

It can be added to any existing class by implementing a single Configure() method.

If you need to emphasis the fact that Configure() method can be called multiple times to change object configuration in runtime, use IReconfigurable interface instead.

public class MyClass: IConfigurable
{
private var _myParam = "default value";
public Task configure(ConfigParams config)
{
this._myParam = config.getAsStringWithDefault("options.param", myParam);
...
}
}

See ConfigParams

Member Function Documentation

◆ Configure()

void PipServices3.Commons.Config.IConfigurable.Configure ( ConfigParams  config)

Configures object by passing configuration parameters.

Parameters
configconfiguration parameters to be set.

Implemented in PipServices3.Commons.Refer.DependencyResolver.


The documentation for this interface was generated from the following file: