File tree Expand file tree Collapse file tree 11 files changed +27
-17
lines changed
Expand file tree Collapse file tree 11 files changed +27
-17
lines changed Original file line number Diff line number Diff line change @@ -149,13 +149,13 @@ private static void Setup()
149149 . Bind ( ) . To < Settings > ( )
150150 . Bind ( ) . To < Info > ( )
151151 . Bind ( ) . To < ConsoleSource > ( )
152- . Bind ( typeof ( LoadFileCodeSource ) ) . To ( ctx => new Func < string , ICodeSource > ( name =>
152+ . Bind ( LoadFileCode ) . To ( ctx => new Func < string , ICodeSource > ( name =>
153153 {
154154 ctx . Inject < LoadFileCodeSource > ( out var loadFileCodeSource ) ;
155155 loadFileCodeSource . Name = name ;
156156 return loadFileCodeSource ;
157157 } ) )
158- . Bind ( typeof ( LineCodeSource ) ) . To ( ctx => new Func < string , ICodeSource > ( line =>
158+ . Bind ( LineCode ) . To ( ctx => new Func < string , ICodeSource > ( line =>
159159 {
160160 ctx . Inject < LineCodeSource > ( out var lineCodeSource ) ;
161161 lineCodeSource . Line = line ;
Original file line number Diff line number Diff line change @@ -4,11 +4,12 @@ namespace CSharpInteractive.Core;
44
55using HostApi ;
66using Pure . DI ;
7+ using static Pure . DI . Tag ;
78
89internal class BuildMessageLogWriter (
910 ILog < BuildMessageLogWriter > log ,
10- [ Tag ( Tag . Base ) ] IStdOut stdOut ,
11- [ Tag ( Tag . Base ) ] IStdErr stdErr )
11+ [ Tag ( Base ) ] IStdOut stdOut ,
12+ [ Tag ( Base ) ] IStdErr stdErr )
1213 : IBuildMessageLogWriter
1314{
1415 public void Write ( ProcessInfo processInfo , BuildMessage message )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ namespace CSharpInteractive.Core;
99
1010using HostApi ;
1111using Pure . DI ;
12+ using static Pure . DI . Tag ;
1213
1314internal class BuildRunner (
1415 IProcessRunner processRunner ,
@@ -17,8 +18,8 @@ internal class BuildRunner(
1718 Func < IBuildContext > buildContextFactory ,
1819 IBuildOutputProcessor buildOutputProcessor ,
1920 Func < IProcessMonitor > monitorFactory ,
20- [ Tag ( Tag . Base ) ] IBuildMessagesProcessor defaultBuildMessagesProcessor ,
21- [ Tag ( Tag . Custom ) ] IBuildMessagesProcessor customBuildMessagesProcessor ,
21+ [ Tag ( Base ) ] IBuildMessagesProcessor defaultBuildMessagesProcessor ,
22+ [ Tag ( Custom ) ] IBuildMessagesProcessor customBuildMessagesProcessor ,
2223 IProcessResultHandler processResultHandler ,
2324 IStartInfoDescription startInfoDescription ,
2425 ICommandLineStatisticsRegistry statisticsRegistry )
Original file line number Diff line number Diff line change 44namespace CSharpInteractive . Core ;
55
66using Pure . DI ;
7+ using static Pure . DI . Tag ;
78
89internal class CISpecific < T > (
910 ICISettings settings ,
10- [ Tag ( Tag . Base ) ] Func < T > defaultFactory ,
11- [ Tag ( Tag . TeamCity ) ] Func < T > teamcityFactory ,
12- [ Tag ( Tag . Ansi ) ] Func < T > ansiFactory )
11+ [ Tag ( Base ) ] Func < T > defaultFactory ,
12+ [ Tag ( TeamCity ) ] Func < T > teamcityFactory ,
13+ [ Tag ( Ansi ) ] Func < T > ansiFactory )
1314 : ICISpecific < T >
1415{
1516 public T Instance => settings . CIType switch
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ namespace CSharpInteractive.Core;
55
66using System . Runtime . InteropServices ;
77using Pure . DI ;
8+ using static Pure . DI . Tag ;
89
910internal class DotNetEnvironment (
10- [ Tag ( Tag . TargetFrameworkMoniker ) ] string targetFrameworkMoniker ,
11- [ Tag ( Tag . ModuleFile ) ] string moduleFile ,
11+ [ Tag ( TargetFrameworkMoniker ) ] string targetFrameworkMoniker ,
12+ [ Tag ( ModuleFile ) ] string moduleFile ,
1213 IEnvironment environment ,
1314 IFileExplorer fileExplorer )
1415 : IDotNetEnvironment , ITraceSource
Original file line number Diff line number Diff line change @@ -6,9 +6,10 @@ namespace CSharpInteractive.Core;
66using HostApi ;
77using JetBrains . TeamCity . ServiceMessages . Write . Special ;
88using Pure . DI ;
9+ using static Pure . DI . Tag ;
910
1011internal class ProcessInFlowRunner (
11- [ Tag ( Tag . Base ) ] IProcessRunner baseProcessRunner ,
12+ [ Tag ( Base ) ] IProcessRunner baseProcessRunner ,
1213 ICISettings ciSettings ,
1314 ITeamCityWriter teamCityWriter ,
1415 IFlowContext flowContext )
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ namespace CSharpInteractive.Core;
66using HostApi ;
77using JetBrains . TeamCity . ServiceMessages ;
88using Pure . DI ;
9+ using static Pure . DI . Tag ;
910
1011internal class ReliableBuildContext (
1112 ICISettings ciSettings ,
1213 IFileSystem fileSystem ,
1314 IMessagesReader messagesReader ,
14- [ Tag ( Tag . Base ) ] IBuildContext baseBuildContext )
15+ [ Tag ( Base ) ] IBuildContext baseBuildContext )
1516 : IBuildContext
1617{
1718 private readonly Dictionary < string , Output > _sources = new ( ) ;
Original file line number Diff line number Diff line change 33namespace CSharpInteractive . Core ;
44
55using Pure . DI ;
6+ using static Pure . DI . Tag ;
67
78internal class RuntimeExplorer (
8- [ Tag ( Tag . RuntimePath ) ] string runtimePath ,
9+ [ Tag ( RuntimePath ) ] string runtimePath ,
910 IFileSystem fileSystem ) : IRuntimeExplorer
1011{
1112 public bool TryFindRuntimeAssembly ( string assemblyPath , [ MaybeNullWhen ( false ) ] out string runtimeAssemblyPath )
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ namespace CSharpInteractive.Core;
44
55using NuGet . Packaging ;
66using Pure . DI ;
7+ using static Pure . DI . Tag ;
78
89internal class ScriptContentReplacer (
910 INuGetReferenceResolver nuGetReferenceResolver ,
@@ -13,7 +14,7 @@ internal class ScriptContentReplacer(
1314 IFileSystem fileSystem ,
1415 IUniqueNameGenerator uniqueNameGenerator ,
1516 IEnvironment environment ,
16- [ Tag ( typeof ( LineCodeSource ) ) ] Func < string , ICodeSource > codeSourceFactory )
17+ [ Tag ( LineCode ) ] Func < string , ICodeSource > codeSourceFactory )
1718 : IScriptContentReplacer
1819{
1920 [ SuppressMessage ( "Performance" , "CA1806:Do not ignore method results" ) ]
Original file line number Diff line number Diff line change @@ -4,13 +4,14 @@ namespace CSharpInteractive.Core;
44
55using System . Collections . Immutable ;
66using Pure . DI ;
7+ using static Pure . DI . Tag ;
78
89internal class Settings (
910 RunningMode runningMode ,
1011 IEnvironment environment ,
1112 ICommandLineParser commandLineParser ,
1213 ICodeSource consoleCodeSource ,
13- [ Tag ( typeof ( LoadFileCodeSource ) ) ] Func < string , ICodeSource > fileCodeSourceFactory )
14+ [ Tag ( LoadFileCode ) ] Func < string , ICodeSource > fileCodeSourceFactory )
1415 : ISettings , ISettingSetter < VerbosityLevel >
1516{
1617 private readonly object _lockObject = new ( ) ;
You can’t perform that action at this time.
0 commit comments