Interface ITestParameterValueProviderRegistry
- Namespace
- Acuit.Pinpoint.Workflows.Testing.Parameters
- Assembly
- Acuit.Pinpoint.Workflows.Testing.dll
The test parameter value provider registry.
public interface ITestParameterValueProviderRegistry
Remarks
The test parameter value provider registry service allows plug-ins to register custom parameter value providers for test workflows.
Methods
GetParameterValueProvider(string)
Gets a workflow parameter value provider that can provide parameter values from registered test parameter value providers for the specified test type.
IParameterValueProvider GetParameterValueProvider(string testTypeName)
Parameters
testTypeName
stringThe test type name.
Returns
- IParameterValueProvider
A IParameterValueProvider that can provide parameter values from registered test parameter value providers for the test type specified by
testTypeName
.
Remarks
The returned parameter value provider will attempt to find a parameter value from all parameter value providers registered via RegisterParameterValueProvider(string, IParameterValueProvider) (whose registrations have not subsequently been removed), in the order in which they were registered. It will always work against the currently-registered providers; i.e., GetParameterValueProvider(string) does not need to be called again after registrations are added or removed.
Registering or removing providers while getting a parameter value via TryGetParameterValue(string, out object) is not supported.
Exceptions
- ArgumentNullException
testTypeName
is null.
RegisterParameterValueProvider(string, IParameterValueProvider)
Registers a custom test parameter value provider.
IDisposable RegisterParameterValueProvider(string testTypeName, IParameterValueProvider parameterValueProvider)
Parameters
testTypeName
stringThe optional name of the test type for which this provider applies, or null or an empty string to indicate that it applies to all test types.
parameterValueProvider
IParameterValueProviderThe parameter value provider.
Returns
- IDisposable
A IDisposable that can be used to remove this registration.
Remarks
Registered custom test parameter value providers will be searched for parameters in the order in which they were registered.
Exceptions
- ArgumentNullException
parameterValueProvider
is null.