示例#1
0
        public OutOfProcessSettingsUpdater(ISettingsEvents settingsEvents, CodeAnalysisSettings initialSettings)
        {
            initialSettings.ThrowOnNull(nameof(initialSettings));

            _settingsEvents   = settingsEvents.CheckIfNull(nameof(settingsEvents));
            _memoryMappedFile = CreateOrOpenMemoryMappedFile();

            WriteSettingsToSharedMemory(initialSettings);

            _settingsEvents.CodeAnalysisSettingChanged += SettingsEvents_CodeAnalysisSettingChanged;
        }
示例#2
0
        public void WriteCodeAnalysisSettings(CodeAnalysisSettings codeAnalysisSettings)
        {
            codeAnalysisSettings.ThrowOnNull(nameof(codeAnalysisSettings));

            if (_isDisposed)
            {
                throw new ObjectDisposedException(objectName: nameof(CodeAnalysisSettingsBinaryWriter));
            }

            _writer.Write(codeAnalysisSettings.RecursiveAnalysisEnabled);
            _writer.Write(codeAnalysisSettings.IsvSpecificAnalyzersEnabled);
            _writer.Write(codeAnalysisSettings.StaticAnalysisEnabled);
            _writer.Write(codeAnalysisSettings.SuppressionMechanismEnabled);
            _writer.Write(codeAnalysisSettings.PX1007DocumentationDiagnosticEnabled);
        }