public ExplorationScope Build(INestedContainer scope, ExplorerContext context) { var explorationScope = new ExplorationScope(scope); explorationScope.UseContext(context); Configure(explorationScope, context); return(explorationScope); }
protected override void Configure(ExplorationScope scope, ExplorerContext context) { var metadata = context.Columns .Zip2(context.ColumnInfos, SingleColumnPublishers) .Select((_, i) => new SingleColumnMetadata(_.Item1, i, _.Item2, _.Item3)); scope.AddPublisher <ColumnCorrelationComponent>( initialise: c => c.Projections = BuildProjections(metadata).ToImmutableArray()); scope.AddPublisher <CorrelatedSampleGenerator>(); }
public ColumnExploration(ExplorationScope scope) : base(scope) { if (!(Context is ExplorerContext)) { throw new InvalidOperationException( $"{nameof(ColumnExploration)} requires a context object in the {nameof(ExplorationScope)}!"); } try { Column = Context.Column; ColumnInfo = Context.ColumnInfo; } catch (InvalidOperationException) { throw new InvalidOperationException( $"{nameof(ColumnExploration)} requires a single-column context but context has {Context.Columns.Length} columns."); } }
protected AbstractExploration(ExplorationScope scope) { completionTask = new Lazy <Task>(async() => await Explore()); Scope = scope; }
protected abstract void Configure(ExplorationScope scope, ExplorerContext context);