提交 53b92a74 编写于 作者: H Heejae Chang

made string const and const value

上级 13075723
......@@ -29,7 +29,7 @@ public class RemoteHostClientService : ForegroundThreadAffinitizedObject, IRemot
private CancellationTokenSource _shutdownCancellationTokenSource;
private Task<RemoteHostClient> _instanceTask;
public RemoteHostClientService(Workspace workspace, IDiagnosticAnalyzerService analyzerService) :
public RemoteHostClientService(Workspace workspace, IDiagnosticAnalyzerService analyzerService) :
base()
{
_gate = new object();
......@@ -217,6 +217,9 @@ private bool FeaturesEnabled()
private bool TestImpactEnabled()
{
const string TestImpactPath = @"CodeAnalysis\TestImpact\IsGloballyEnabled";
const string KeyName = "Value";
// TODO: think about how to get rid of this code. since we don't want any code that require foreground
// thread to run
AssertIsForeground();
......@@ -224,9 +227,9 @@ private bool TestImpactEnabled()
var shellSettingsManager = new ShellSettingsManager(Shell.ServiceProvider.GlobalProvider);
var writeableSettingsStore = shellSettingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);
if (writeableSettingsStore.PropertyExists(@"CodeAnalysis\TestImpact\IsGloballyEnabled", "Value"))
if (writeableSettingsStore.PropertyExists(TestImpactPath, KeyName))
{
return writeableSettingsStore.GetBoolean(@"CodeAnalysis\TestImpact\IsGloballyEnabled", "Value");
return writeableSettingsStore.GetBoolean(TestImpactPath, KeyName);
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册