Ejemplo n.º 1
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("");
        }
Ejemplo n.º 2
0
 public QueryShowState(QueryAddState queryAddState)
 {
     this.queryAddState = queryAddState;
 }
Ejemplo n.º 3
0
 public ShowLicenceState(QueryAddState queryAddState, string name)
 {
     this.queryAddState = queryAddState;
     Name = name;
 }