Example #1
0
        /// <summary>
        /// Invites the specified visitor to visit this class.
        /// </summary>
        /// <param name="visitor">The class that wants to visit this class.</param>
        /// <exception cref="ArgumentNullException">
        /// If visitor is null.
        /// </exception>
        public void Accept(IExecutionVisitor visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException();
            }

            visitor.Visit(this);
        }
Example #2
0
 public PerformanceTestState(IInterpreterRepository repository, ISpatialRepository spatialRepository, IQueryReader queryReader, ISymbolVisitor symbolVisitor,
                             IExecutionVisitor executionVisitor, IFuncVisitor funcVisitor, ILogger logger, ISettings settings, string name)
 {
     Repository            = repository;
     SpatialRepository     = spatialRepository;
     this.queryReader      = queryReader;
     this.symbolVisitor    = symbolVisitor;
     this.executionVisitor = executionVisitor;
     this.funcVisitor      = funcVisitor;
     this.logger           = logger;
     this.settings         = settings;
     this.Name             = name;
 }
Example #3
0
        public ExecuteAllState(SymbolClearState clearState, IInterpreterRepository repository, ISpatialRepository spatialRepository, IQueryReader queryReader,
                               ISymbolVisitor symbolVisitor, IExecutionVisitor executionVisitor, IFuncVisitor funcVisitor,
                               string name, QueryShowState queryShowState, ResultShowState resultShowState)
        {
            Repository            = repository;
            SpatialRepository     = spatialRepository;
            this.clearState       = clearState;
            this.queryReader      = queryReader;
            this.symbolVisitor    = symbolVisitor;
            this.executionVisitor = executionVisitor;
            this.funcVisitor      = funcVisitor;
            this.queryShowState   = queryShowState;
            this.resultShowState  = resultShowState;

            Name = name;
        }
Example #4
0
        public Context(IQueryReader queryReader, ISymbolVisitor symbolVisitor, IExecutionVisitor executionVisitor, IFuncVisitor funcVisitor,
                       ISpatialRepository spatialRepository, IInterpreterRepository repository, ISettings settings, ILogger logger)
        {
            this.spatialRepository = spatialRepository;

            queryClearState = new QueryClearState()
            {
                Repository = repository, Name = "QueryClearState"
            };
            queryAddState = new QueryAddState()
            {
                Repository = repository, Name = "QueryAddState"
            };
            queryShowState = new QueryShowState(queryAddState)
            {
                Repository = repository, Name = "QueryShowState"
            };
            queryAddState.ShowState = queryShowState;

            symbolShowState  = new SymbolShowState(repository, "SymbolShowState");
            symbolClearState = new SymbolClearState(repository, spatialRepository, symbolShowState, queryShowState, "SymbolClearState");

            resultShowState = new ResultShowState(repository, queryShowState, "ResultShowState");
            executeAllState = new ExecuteAllState(symbolClearState, repository, spatialRepository, queryReader, symbolVisitor, executionVisitor, funcVisitor,
                                                  "ExecuteAllState", queryShowState, resultShowState);

            resultWriteState = new ResultWriteState(repository, "ResultWriteState", resultShowState);

            showSettingsState = new ShowSettingsState(settings, "ShowSettingsState");
            showLicenceState  = new ShowLicenceState(queryAddState, "ShowLicenceState");

            performanceTestState = new PerformanceTestState(repository, spatialRepository, queryReader, symbolVisitor, executionVisitor,
                                                            funcVisitor, logger, settings, "PerformanceTestState");

            currentState = showLicenceState;
            currentState = currentState.Execute("");
        }
Example #5
0
        /// <summary>
        /// Initializes a new instance of <see cref="FailSkipVisitor"/>.
        /// </summary>
        /// <param name="visitor">The visitor to pass messages onto.</param>
        public FailSkipVisitor(IExecutionVisitor visitor)
        {
            Guard.ArgumentNotNull(nameof(visitor), visitor);

            Visitor = visitor;
        }
Example #6
0
 public FailSkipVisitor(IExecutionVisitor visitor)
 {
     Visitor = visitor;
 }
Example #7
0
 public FailSkipVisitorTests()
 {
     innerVisitor = Substitute.For<IExecutionVisitor>();
     visitor = new FailSkipVisitor(innerVisitor);
 }
Example #8
0
 public FailSkipVisitorTests()
 {
     innerVisitor = Substitute.For <IExecutionVisitor>();
     visitor      = new FailSkipVisitor(innerVisitor);
 }
Example #9
0
 public void Accept(IExecutionVisitor executionVisitor)
 {
     executionVisitor.Visit(this);
 }
Example #10
0
 public void Accept(IExecutionVisitor visitor)
 {
     visitor.Visit(this);
     foreach (IExecution child in Children)
     {
         child.Accept(visitor);
     }
 }