Пример #1
0
        LocalsVM(IDebuggerSettings debuggerSettings, ILocalsSettings localsSettings, IMethodLocalProvider methodLocalProvider, IStackFrameService stackFrameService, ITheDebugger theDebugger, IAskUser askUser, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider)
        {
            dispatcher               = Dispatcher.CurrentDispatcher;
            this.askUser             = askUser;
            this.methodLocalProvider = methodLocalProvider;
            this.debuggerSettings    = debuggerSettings;
            this.stackFrameService   = stackFrameService;
            TheDebugger              = theDebugger;

            var classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc);

            printerContext = new PrinterContext(classificationFormatMap, textElementProvider)
            {
                SyntaxHighlight  = debuggerSettings.SyntaxHighlightLocals,
                UseHexadecimal   = debuggerSettings.UseHexadecimal,
                TypePrinterFlags = TypePrinterFlags.ShowArrayValueSizes,
            };
            printerContext.TypePrinterFlags = GetTypePrinterFlags(localsSettings, printerContext.TypePrinterFlags);
            printerContext.TypePrinterFlags = GetTypePrinterFlags(debuggerSettings, printerContext.TypePrinterFlags);

            methodLocalProvider.NewMethodInfoAvailable += MethodLocalProvider_NewMethodInfoAvailable;
            Root = new SharpTreeNode();
            stackFrameService.StackFramesUpdated += StackFrameService_StackFramesUpdated;
            stackFrameService.PropertyChanged    += StackFrameService_PropertyChanged;
            theDebugger.OnProcessStateChanged    += TheDebugger_OnProcessStateChanged;
            theDebugger.ProcessRunning           += TheDebugger_ProcessRunning;
            debuggerSettings.PropertyChanged     += DebuggerSettings_PropertyChanged;
            localsSettings.PropertyChanged       += LocalsSettings_PropertyChanged;
            classificationFormatMap.ClassificationFormatMappingChanged += ClassificationFormatMap_ClassificationFormatMappingChanged;
        }
Пример #2
0
        LocalsVM(IImageManager imageManager, IDebuggerSettings debuggerSettings, ILocalsSettings localsSettings, IMethodLocalProvider methodLocalProvider, IStackFrameManager stackFrameManager, ITheDebugger theDebugger, IAskUser askUser)
        {
            this.dispatcher          = Dispatcher.CurrentDispatcher;
            this.askUser             = askUser;
            this.methodLocalProvider = methodLocalProvider;
            this.debuggerSettings    = debuggerSettings;
            this.stackFrameManager   = stackFrameManager;
            this.theDebugger         = theDebugger;

            this.printerContext = new PrinterContext(imageManager)
            {
                SyntaxHighlight  = debuggerSettings.SyntaxHighlightLocals,
                UseHexadecimal   = debuggerSettings.UseHexadecimal,
                TypePrinterFlags = TypePrinterFlags.ShowArrayValueSizes,
            };
            this.printerContext.TypePrinterFlags = GetTypePrinterFlags(localsSettings, this.printerContext.TypePrinterFlags);
            this.printerContext.TypePrinterFlags = GetTypePrinterFlags(debuggerSettings, this.printerContext.TypePrinterFlags);

            methodLocalProvider.NewMethodInfoAvailable += MethodLocalProvider_NewMethodInfoAvailable;
            this.rootNode = new SharpTreeNode();
            stackFrameManager.StackFramesUpdated += StackFrameManager_StackFramesUpdated;
            stackFrameManager.PropertyChanged    += StackFrameManager_PropertyChanged;
            theDebugger.OnProcessStateChanged    += TheDebugger_OnProcessStateChanged;
            theDebugger.ProcessRunning           += TheDebugger_ProcessRunning;
            debuggerSettings.PropertyChanged     += DebuggerSettings_PropertyChanged;
            localsSettings.PropertyChanged       += LocalsSettings_PropertyChanged;
        }