Pip-Services-Commons-Dotnet
Static Public Member Functions | List of all members
PipServices3.Commons.Run.Opener Class Reference

Helper class that opens components. More...

Static Public Member Functions

static bool IsOpenOne (object component)
 Checks if specified component is opened. More...
 
static bool IsOpen (IEnumerable components)
 Checks if all components are opened. More...
 
static async Task OpenOneAsync (string correlationId, object component)
 Opens specific component. More...
 
static async Task OpenAsync (string correlationId, IEnumerable components)
 Opens multiple component. More...
 

Detailed Description

Helper class that opens components.

See IOpenable

Member Function Documentation

◆ IsOpen()

static bool PipServices3.Commons.Run.Opener.IsOpen ( IEnumerable  components)
static

Checks if all components are opened.

To be checked components must implement IOpenable interface. If they don't the call to this method returns true.

Parameters
componentsa list of components that are to be checked.
Returns
true if all components are opened and false if at least one component is closed.

See IsOpenOne(object), IOpenable

◆ IsOpenOne()

static bool PipServices3.Commons.Run.Opener.IsOpenOne ( object  component)
static

Checks if specified component is opened.

To be checked components must implement IOpenable interface. If they don't the call to this method returns true.

Parameters
componentthe component that is to be checked.
Returns
true if component is opened and false otherwise.

See IOpenable

◆ OpenAsync()

static async Task PipServices3.Commons.Run.Opener.OpenAsync ( string  correlationId,
IEnumerable  components 
)
static

Opens multiple component.

To be opened components must implement IOpenable interface. If they don't the call to this method has no effect.

Parameters
correlationId(optional) transaction id to trace execution through call chain.
componentthe list of components that is to be opened.

◆ OpenOneAsync()

static async Task PipServices3.Commons.Run.Opener.OpenOneAsync ( string  correlationId,
object  component 
)
static

Opens specific component.

To be opened components must implement IOpenable interface. If they don't the call to this method has no effect.

Parameters
correlationId(optional) transaction id to trace execution through call chain.
componentthe component that is to be opened.

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