Skip to content

Commit 6d65ce8

Browse files
committed
Fix post cherry-pick
1 parent a873a1d commit 6d65ce8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Razor/src/Microsoft.VisualStudio.LanguageServerClient.Razor/RazorProjectInfoPublisher.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System;
55
using System.Collections.Generic;
66
using System.ComponentModel.Composition;
7+
using System.Diagnostics;
78
using System.IO;
89
using System.Linq;
910
using System.Threading.Tasks;

src/Razor/test/Microsoft.VisualStudio.LanguageServerClient.Razor.Test/RazorProjectInfoPublisherTest.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ private class TestRazorProjectInfoPublisher : RazorProjectInfoPublisher
624624

625625
private readonly bool _shouldSerialize;
626626
private readonly bool _useRealShouldSerialize;
627+
private readonly bool _configurationFileExists;
627628

628629
static TestRazorProjectInfoPublisher()
629630
{
@@ -636,17 +637,19 @@ public TestRazorProjectInfoPublisher(
636637
ProjectConfigurationFilePathStore projectStatePublishFilePathStore,
637638
Action<IProjectSnapshot, string> onSerializeToFile = null,
638639
bool shouldSerialize = true,
639-
bool useRealShouldSerialize = false)
640+
bool useRealShouldSerialize = false,
641+
bool configurationFileExists = true)
640642
: base(s_lspEditorFeatureDetector.Object, projectStatePublishFilePathStore, TestRazorLogger.Instance)
641643
{
642644
_onSerializeToFile = onSerializeToFile ?? ((_1, _2) => throw new XunitException("SerializeToFile should not have been called."));
643645
_shouldSerialize = shouldSerialize;
644646
_useRealShouldSerialize = useRealShouldSerialize;
647+
_configurationFileExists = configurationFileExists;
645648
}
646649

647650
protected override bool FileExists(string file)
648651
{
649-
return true;
652+
return _configurationFileExists;
650653
}
651654

652655
protected override void SerializeToFile(IProjectSnapshot projectSnapshot, string configurationFilePath) => _onSerializeToFile?.Invoke(projectSnapshot, configurationFilePath);

0 commit comments

Comments
 (0)