public DbgEngineExpressionEvaluatorImpl(DbgModuleReferenceProvider dbgModuleReferenceProvider, DbgDotNetExpressionCompiler expressionCompiler, DbgDotNetILInterpreter dnILInterpreter, DbgAliasProvider dbgAliasProvider, IPredefinedEvaluationErrorMessagesHelper predefinedEvaluationErrorMessagesHelper)
 {
     this.dbgModuleReferenceProvider = dbgModuleReferenceProvider ?? throw new ArgumentNullException(nameof(dbgModuleReferenceProvider));
     this.expressionCompiler         = expressionCompiler ?? throw new ArgumentNullException(nameof(expressionCompiler));
     this.dnILInterpreter            = dnILInterpreter ?? throw new ArgumentNullException(nameof(dnILInterpreter));
     this.dbgAliasProvider           = dbgAliasProvider ?? throw new ArgumentNullException(nameof(dbgAliasProvider));
     this.predefinedEvaluationErrorMessagesHelper = predefinedEvaluationErrorMessagesHelper ?? throw new ArgumentNullException(nameof(predefinedEvaluationErrorMessagesHelper));
 }
 public DbgEngineLocalsProviderImpl(DbgModuleReferenceProvider dbgModuleReferenceProvider, DbgDotNetExpressionCompiler expressionCompiler, DbgDotNetEngineValueNodeFactory valueNodeFactory, DbgDotNetILInterpreter dnILInterpreter, DbgAliasProvider dbgAliasProvider)
 {
     this.dbgModuleReferenceProvider = dbgModuleReferenceProvider ?? throw new ArgumentNullException(nameof(dbgModuleReferenceProvider));
     this.expressionCompiler         = expressionCompiler ?? throw new ArgumentNullException(nameof(expressionCompiler));
     this.valueNodeFactory           = valueNodeFactory ?? throw new ArgumentNullException(nameof(valueNodeFactory));
     this.dnILInterpreter            = dnILInterpreter ?? throw new ArgumentNullException(nameof(dnILInterpreter));
     this.dbgAliasProvider           = dbgAliasProvider ?? throw new ArgumentNullException(nameof(dbgAliasProvider));
 }
Пример #3
0
        public DbgEngineLanguageImpl(DbgModuleReferenceProvider dbgModuleReferenceProvider, string name, string displayName, DbgDotNetExpressionCompiler expressionCompiler, DbgMethodDebugInfoProvider dbgMethodDebugInfoProvider, IDecompiler decompiler, DbgDotNetFormatter formatter, DbgDotNetEngineValueNodeFactory valueNodeFactory, DbgDotNetILInterpreter dnILInterpreter, DbgAliasProvider dbgAliasProvider, IPredefinedEvaluationErrorMessagesHelper predefinedEvaluationErrorMessagesHelper)
        {
            if (dbgModuleReferenceProvider == null)
            {
                throw new ArgumentNullException(nameof(dbgModuleReferenceProvider));
            }
            if (formatter == null)
            {
                throw new ArgumentNullException(nameof(formatter));
            }
            if (valueNodeFactory == null)
            {
                throw new ArgumentNullException(nameof(valueNodeFactory));
            }
            if (dnILInterpreter == null)
            {
                throw new ArgumentNullException(nameof(dnILInterpreter));
            }
            if (dbgAliasProvider == null)
            {
                throw new ArgumentNullException(nameof(dbgAliasProvider));
            }
            if (predefinedEvaluationErrorMessagesHelper == null)
            {
                throw new ArgumentNullException(nameof(predefinedEvaluationErrorMessagesHelper));
            }
            Name        = name ?? throw new ArgumentNullException(nameof(name));
            DisplayName = displayName ?? throw new ArgumentNullException(nameof(displayName));
            this.dbgMethodDebugInfoProvider = dbgMethodDebugInfoProvider ?? throw new ArgumentNullException(nameof(dbgMethodDebugInfoProvider));
            this.expressionCompiler         = expressionCompiler ?? throw new ArgumentNullException(nameof(expressionCompiler));
            this.decompiler = decompiler ?? throw new ArgumentNullException(nameof(decompiler));
            var expressionEvaluator = new DbgEngineExpressionEvaluatorImpl(dbgModuleReferenceProvider, expressionCompiler, dnILInterpreter, dbgAliasProvider, predefinedEvaluationErrorMessagesHelper);

            ExpressionEvaluator               = expressionEvaluator;
            Formatter                         = new DbgEngineFormatterImpl(formatter);
            LocalsProvider                    = new DbgEngineLocalsProviderImpl(dbgModuleReferenceProvider, expressionCompiler, valueNodeFactory, dnILInterpreter, dbgAliasProvider);
            AutosProvider                     = new DbgEngineAutosProviderImpl(valueNodeFactory);
            ExceptionsProvider                = new DbgEngineExceptionsProviderImpl(valueNodeFactory);
            ReturnValuesProvider              = new DbgEngineReturnValuesProviderImpl(valueNodeFactory);
            TypeVariablesProvider             = new DbgEngineTypeVariablesProviderImpl(valueNodeFactory);
            ValueNodeFactory                  = new DbgEngineValueNodeFactoryImpl(expressionEvaluator, valueNodeFactory, formatter);
            debuggerDisplayAttributeEvaluator = expressionEvaluator;
        }