Method Bind
| Improve this Doc View SourceBind<TSettings>()
Binds the instance of the environment variables provider to a new instance of type TSettings.
Declaration
public TSettings Bind<TSettings>()
where TSettings : new()
Returns
| Type | Description |
|---|---|
| TSettings | The new instance of TSettings. |
Type Parameters
| Name | Description |
|---|---|
| TSettings | The type of the new instance to bind. |
Implements
Remarks
Binds only read-write properties and, moreover, only sets public properties.
Exceptions
| Type | Condition |
|---|---|
| BinderException | If the binder encounters one or more errors. |
Bind<TSettings>(out EnvValidationResult)
Binds the instance of the environment variables provider to a new instance of type TSettings.
Declaration
public TSettings Bind<TSettings>(out EnvValidationResult result)
where TSettings : new()
Parameters
| Type | Name | Description |
|---|---|---|
| EnvValidationResult | result | The result contains the errors found by the binder. |
Returns
| Type | Description |
|---|---|
| TSettings | The new instance of TSettings. |
Type Parameters
| Name | Description |
|---|---|
| TSettings | The type of the new instance to bind. |
Implements
Remarks
Binds only read-write properties and, moreover, only sets public properties.
Exceptions
| Type | Condition |
|---|---|
| BinderException | If the binder encounters one or more errors. |