private MarketDataSnapshotProcessor(ManageableMarketDataSnapshot snapshot, RemoteEngineContext remoteEngineContext, SnapshotLiveDataStreamInvalidater liveDataStream) { _snapshot = snapshot; _financialClient = remoteEngineContext.CreateFinancialClient(); _marketDataSnapshotMaster = _financialClient.MarketDataSnapshotMaster; _liveDataStream = liveDataStream; _temporarySnapshotUid = new Lazy<UniqueId>(() => _marketDataSnapshotMaster.Add(new MarketDataSnapshotDocument(null, GetShallowCloneSnapshot())).UniqueId); _snapshotDataStream = new Lazy<SnapshotDataStreamInvalidater>(() => new SnapshotDataStreamInvalidater(_liveDataStream, remoteEngineContext, _temporarySnapshotUid.Value)); }
private MarketDataSnapshotProcessor(ManageableMarketDataSnapshot snapshot, RemoteEngineContext remoteEngineContext, SnapshotLiveDataStreamInvalidater liveDataStream) { _snapshot = snapshot; _financialClient = remoteEngineContext.CreateFinancialClient(); _marketDataSnapshotMaster = _financialClient.MarketDataSnapshotMaster; _liveDataStream = liveDataStream; _temporarySnapshotUid = new Lazy <UniqueId>(() => _marketDataSnapshotMaster.Add(new MarketDataSnapshotDocument(null, GetShallowCloneSnapshot())).UniqueId); _snapshotDataStream = new Lazy <SnapshotDataStreamInvalidater>(() => new SnapshotDataStreamInvalidater(_liveDataStream, remoteEngineContext, _temporarySnapshotUid.Value)); }
internal static MarketDataSnapshotProcessor Create(RemoteEngineContext context, ViewDefinition definition, CancellationToken ct) { using (var liveDataStream = new LiveDataStream(definition.Name, context)) { ManageableMarketDataSnapshot snapshot = liveDataStream.GetNewSnapshotForUpdate(ct); //NOTE: we could consider reusing the LiveDataStream, but server side will share the processer return(new MarketDataSnapshotProcessor(context, snapshot)); } }
public ViewDefinition CreateViewDefinition(RemoteEngineContext context, ValueRequirement valueRequirement) { var viewDefinition = new ViewDefinition(TestUtils.GetUniqueName()); viewDefinition.CalculationConfigurationsByName.Add("Default", new ViewCalculationConfiguration("Default", new List<ValueRequirement> { valueRequirement }, new Dictionary<string, HashSet<Tuple<string, ValueProperties>>>())); using (var remoteClient = context.CreateFinancialClient()) { var uid = remoteClient.ViewDefinitionRepository.AddViewDefinition(new AddViewDefinitionRequest(viewDefinition)); viewDefinition.UniqueID = uid; } _createdViews.Enqueue(Tuple.Create(context, viewDefinition.Name)); return viewDefinition; }
internal MarketDataSnapshotProcessor(RemoteEngineContext remoteEngineContext, ManageableMarketDataSnapshot snapshot) : this(snapshot, remoteEngineContext, new SnapshotLiveDataStreamInvalidater(snapshot, remoteEngineContext)) { }
public MarketDataSnapshotManager(RemoteEngineContext remoteEngineContext) { _remoteEngineContext = remoteEngineContext; }
internal static MarketDataSnapshotProcessor Create(RemoteEngineContext context, ViewDefinition definition, CancellationToken ct) { using (var liveDataStream = new LiveDataStream(definition.Name, context)) { ManageableMarketDataSnapshot snapshot = liveDataStream.GetNewSnapshotForUpdate(ct); //NOTE: we could consider reusing the LiveDataStream, but server side will share the processer return new MarketDataSnapshotProcessor(context, snapshot); } }