Class GuardProvider
This class collects all implementations of the different interfaces that provide guard clause functionalities. The provider class is used by the static class Guard that provides access to the implementations.
Inheritance
Namespace: TeleScope.GuardClauses
Assembly: TeleScope.GuardClauses.dll
Syntax
public sealed class GuardProvider : object
Constructors
| Improve this Doc View SourceGuardProvider()
The default empty constructor implements the TeleScope.GuardClauses.DefaultGuard class.
Declaration
public GuardProvider()
GuardProvider(GuardBase)
This constructor takes an implemenation of type TeleScope.GuardClauses.DefaultGuard and stores it internally.
Declaration
public GuardProvider(GuardBase guard)
Parameters
Type | Name | Description |
---|---|---|
GuardBase | guard | The implementation of guard functions. |
Methods
| Improve this Doc View SourceNew(GuardBase)
Adds a new instance that implements the full set of guard functionalities derived from GuardBase.
Declaration
public void New(GuardBase guard)
Parameters
Type | Name | Description |
---|---|---|
GuardBase | guard | The implementation of guard functions. |
New(ICollectionGuardable)
Adds a new instance that implements a partial set of guard functionalities from ICollectionGuardable.
Declaration
public void New(ICollectionGuardable collectionGuard)
Parameters
Type | Name | Description |
---|---|---|
ICollectionGuardable | collectionGuard | The implementation of guard functions. |
New(IDefensiveGuardable)
Adds a new instance that implements a partial set of guard functionalities from IDefensiveGuardable.
Declaration
public void New(IDefensiveGuardable guard)
Parameters
Type | Name | Description |
---|---|---|
IDefensiveGuardable | guard | The implementation of guard functions. |
New(INumericGuardable)
Adds a new instance that implements a partial set of guard functionalities from INumericGuardable.
Declaration
public void New(INumericGuardable numericGuard)
Parameters
Type | Name | Description |
---|---|---|
INumericGuardable | numericGuard | The implementation of guard functions. |
New(IStringGuardable)
Adds a new instance that implements a partial set of guard functionalities from IStringGuardable.
Declaration
public void New(IStringGuardable stringGuard)
Parameters
Type | Name | Description |
---|---|---|
IStringGuardable | stringGuard | The implementation of guard functions. |