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));
 }
Esempio n. 2
0
 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));
 }
Esempio n. 3
0
 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));
     }
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 internal MarketDataSnapshotProcessor(RemoteEngineContext remoteEngineContext, ManageableMarketDataSnapshot snapshot)
     : this(snapshot, remoteEngineContext, new SnapshotLiveDataStreamInvalidater(snapshot, remoteEngineContext))
 {
 }
 public MarketDataSnapshotManager(RemoteEngineContext remoteEngineContext)
 {
     _remoteEngineContext = remoteEngineContext;
 }
Esempio n. 7
0
 public MarketDataSnapshotManager(RemoteEngineContext remoteEngineContext)
 {
     _remoteEngineContext = remoteEngineContext;
 }
 internal MarketDataSnapshotProcessor(RemoteEngineContext remoteEngineContext, ManageableMarketDataSnapshot snapshot)
     : this(snapshot, remoteEngineContext, new SnapshotLiveDataStreamInvalidater(snapshot, 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);
     }
 }