Lean
$LEAN_TAG$
|
Provides the ability to synchronize subscriptions into time slices More...
Public Member Functions | |
SubscriptionSynchronizer (UniverseSelection universeSelection) | |
Initializes a new instance of the SubscriptionSynchronizer class More... | |
void | SetTimeProvider (ITimeProvider timeProvider) |
Sets the time provider. If already set will throw. More... | |
void | SetTimeSliceFactory (TimeSliceFactory timeSliceFactory) |
Sets the TimeSliceFactory instance to use More... | |
IEnumerable< TimeSlice > | Sync (IEnumerable< Subscription > subscriptions, CancellationToken cancellationToken) |
Syncs the specified subscriptions. The frontier time used for synchronization is managed internally and dependent upon previous synchronization operations. More... | |
DateTime | GetUtcNow () |
Returns the current UTC frontier time More... | |
Protected Member Functions | |
virtual void | OnSubscriptionFinished (Subscription subscription) |
Event invocator for the SubscriptionFinished event More... | |
Events | |
EventHandler< Subscription > | SubscriptionFinished |
Event fired when a Subscription is finished More... | |
Events inherited from QuantConnect.Lean.Engine.DataFeeds.ISubscriptionSynchronizer | |
EventHandler< Subscription > | SubscriptionFinished |
Event fired when a subscription is finished More... | |
Provides the ability to synchronize subscriptions into time slices
Definition at line 29 of file SubscriptionSynchronizer.cs.
QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.SubscriptionSynchronizer | ( | UniverseSelection | universeSelection | ) |
Initializes a new instance of the SubscriptionSynchronizer class
universeSelection | The universe selection instance used to handle universe selection subscription output |
Definition at line 47 of file SubscriptionSynchronizer.cs.
void QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.SetTimeProvider | ( | ITimeProvider | timeProvider | ) |
Sets the time provider. If already set will throw.
timeProvider | The time provider, used to obtain the current frontier UTC value |
Definition at line 56 of file SubscriptionSynchronizer.cs.
void QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.SetTimeSliceFactory | ( | TimeSliceFactory | timeSliceFactory | ) |
Sets the TimeSliceFactory instance to use
timeSliceFactory | Used to create the new TimeSlice |
Definition at line 70 of file SubscriptionSynchronizer.cs.
IEnumerable<TimeSlice> QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.Sync | ( | IEnumerable< Subscription > | subscriptions, |
CancellationToken | cancellationToken | ||
) |
Syncs the specified subscriptions. The frontier time used for synchronization is managed internally and dependent upon previous synchronization operations.
subscriptions | The subscriptions to sync |
cancellationToken | The cancellation token to stop enumeration |
Implements QuantConnect.Lean.Engine.DataFeeds.ISubscriptionSynchronizer.
Definition at line 85 of file SubscriptionSynchronizer.cs.
|
protectedvirtual |
Event invocator for the SubscriptionFinished event
Definition at line 261 of file SubscriptionSynchronizer.cs.
DateTime QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.GetUtcNow | ( | ) |
Returns the current UTC frontier time
Implements QuantConnect.ITimeProvider.
Definition at line 269 of file SubscriptionSynchronizer.cs.
EventHandler<Subscription> QuantConnect.Lean.Engine.DataFeeds.SubscriptionSynchronizer.SubscriptionFinished |
Event fired when a Subscription is finished
Definition at line 39 of file SubscriptionSynchronizer.cs.