public SnapshotDataStreamInvalidater(SnapshotLiveDataStreamInvalidater liveStream, RemoteEngineContext remoteEngineContext, UniqueId snapshotId) { _liveStream = liveStream; _remoteEngineContext = remoteEngineContext; _snapshotId = snapshotId; _financialClient = remoteEngineContext.CreateFinancialClient(); _liveStream.GraphChanged += OnGraphChanged; _constructedEvent.Set(); }
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); }