C# Class IDL.Net.CircuitBreaker.Circuit

Inheritance: ICircuit
显示文件 Open project: InvitationDigital/IDL.Net.CircuitBreaker Class Usage Examples

Protected Properties

Property Type Description
Threshold int
Timeout System.TimeSpan

Public Methods

Method Description
Circuit ( int threshold, System.TimeSpan timeout, CircuitState state ) : System
Execute ( System.Action action ) : void
ExecuteAsync ( System.Action action ) : System.Threading.Tasks.Task

Protected Methods

Method Description
AssertState ( CircuitPosition position ) : void
HandleException ( Exception exception, CircuitState state ) : void

Method Details

AssertState() protected method

protected AssertState ( CircuitPosition position ) : void
position CircuitPosition
return void

Circuit() public method

public Circuit ( int threshold, System.TimeSpan timeout, CircuitState state ) : System
threshold int
timeout System.TimeSpan
state CircuitState
return System

Execute() public method

public Execute ( System.Action action ) : void
action System.Action
return void

ExecuteAsync() public method

public ExecuteAsync ( System.Action action ) : System.Threading.Tasks.Task
action System.Action
return System.Threading.Tasks.Task

HandleException() protected method

protected HandleException ( Exception exception, CircuitState state ) : void
exception System.Exception
state CircuitState
return void

Property Details

Threshold protected_oe property

protected int Threshold
return int

Timeout protected_oe property

protected TimeSpan,System Timeout
return System.TimeSpan