Lean  $LEAN_TAG$
QuantConnect.IsolatorLimitResultProvider Class Reference

Provides access to the NullIsolatorLimitResultProvider and extension methods supporting ScheduledEvent More...

Static Public Member Functions

static void Consume (this IIsolatorLimitResultProvider isolatorLimitProvider, ScheduledEvent scheduledEvent, DateTime scanTimeUtc, TimeMonitor timeMonitor)
 Convenience method for invoking a scheduled event's Scan method inside the IsolatorLimitResultProvider More...
 
static void Consume (this IIsolatorLimitResultProvider isolatorLimitProvider, ITimeProvider timeProvider, Action code, TimeMonitor timeMonitor)
 Executes the provided code block and while the code block is running, continually consume from the limit result provided one token each minute. This function allows the code to run for the first full minute without requesting additional time from the provider. Following that, every minute an additional one minute will be requested from the provider. More...
 

Static Public Attributes

static readonly IIsolatorLimitResultProvider Null = new NullIsolatorLimitResultProvider()
 Provides access to a null implementation of IIsolatorLimitResultProvider More...
 

Detailed Description

Provides access to the NullIsolatorLimitResultProvider and extension methods supporting ScheduledEvent

Definition at line 24 of file IsolatorLimitResultProvider.cs.

Member Function Documentation

◆ Consume() [1/2]

static void QuantConnect.IsolatorLimitResultProvider.Consume ( this IIsolatorLimitResultProvider  isolatorLimitProvider,
ScheduledEvent  scheduledEvent,
DateTime  scanTimeUtc,
TimeMonitor  timeMonitor 
)
static

Convenience method for invoking a scheduled event's Scan method inside the IsolatorLimitResultProvider

Definition at line 34 of file IsolatorLimitResultProvider.cs.

◆ Consume() [2/2]

static void QuantConnect.IsolatorLimitResultProvider.Consume ( this IIsolatorLimitResultProvider  isolatorLimitProvider,
ITimeProvider  timeProvider,
Action  code,
TimeMonitor  timeMonitor 
)
static

Executes the provided code block and while the code block is running, continually consume from the limit result provided one token each minute. This function allows the code to run for the first full minute without requesting additional time from the provider. Following that, every minute an additional one minute will be requested from the provider.

This method exists to support scheduled events, and as such, intercepts any errors raised via the provided code and wraps them in a ScheduledEventException. If in the future this is usable elsewhere, consider refactoring to handle the errors in a different fashion.

Definition at line 62 of file IsolatorLimitResultProvider.cs.

Here is the call graph for this function:

Member Data Documentation

◆ Null

readonly IIsolatorLimitResultProvider QuantConnect.IsolatorLimitResultProvider.Null = new NullIsolatorLimitResultProvider()
static

Provides access to a null implementation of IIsolatorLimitResultProvider

Definition at line 29 of file IsolatorLimitResultProvider.cs.


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