-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 19 additions & 11 deletions
30
src/dotnet/ReSharperPlugin.NSubstituteComplete/Options/MockAliasesModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using JetBrains.Annotations; | ||
using JetBrains.Application.Settings; | ||
using JetBrains.Application.UI.Options; | ||
using JetBrains.IDE.UI.Extensions; | ||
using JetBrains.Lifetimes; | ||
using JetBrains.ReSharper.UnitTestFramework.Settings; | ||
using JetBrains.ReSharper.UnitTestFramework.UI.Options.ViewModel; | ||
using JetBrains.Threading; | ||
using JetBrains.Util.Media; | ||
|
||
namespace ReSharperPlugin.NSubstituteComplete.Options | ||
{ | ||
public class MockAliasesModel : BeTreeGridExtensions.DictionaryModel<string, string>.FromIndexed | ||
{ | ||
public MockAliasesModel( | ||
Lifetime lifetime, | ||
[NotNull] GroupingEventHosts hosts, | ||
[NotNull] OptionsSettingsSmartContext smartContext | ||
public class MockAliasesModel( | ||
Lifetime lifetime, | ||
[NotNull] GroupingEventHosts hosts, | ||
[NotNull] OptionsSettingsSmartContext smartContext | ||
) | ||
: BeTreeGridExtensions.DictionaryModel<string, string>.FromScalar<string>( | ||
lifetime, | ||
hosts, | ||
smartContext, | ||
smartContext.Schema.GetScalarEntry<NSubstituteCompleteSettings, string>(s => s.MockAliases), | ||
SemicolonSeparatedPairSerializer.Deserialize, | ||
SemicolonSeparatedPairSerializer.Serialize | ||
) | ||
: base(lifetime, hosts, smartContext, smartContext.Schema.GetIndexedEntry<UnitTestRunnerSettings, IIndexedEntry<string, string>>(s => s.EnvironmentVariablesIndexed)) | ||
{ | ||
} | ||
|
||
public override Entry GetNewEntry() => new(this.myLifetime, this.mySaveRequested.Incoming, string.Empty, string.Empty); | ||
{ | ||
public override Entry GetNewEntry() => new(myLifetime, mySaveRequested.Incoming, string.Empty, string.Empty); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters