Skip to content

Commit 751a48a

Browse files
Updating internal Pure.DI to 2.1.44
1 parent 9630e2d commit 751a48a

12 files changed

+32
-31
lines changed

CSharpInteractive.Tests/CSharpInteractive.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1212
<PackageReference Include="Moq" Version="4.20.72" />
13-
<PackageReference Include="Pure.DI" Version="2.1.43">
13+
<PackageReference Include="Pure.DI" Version="2.1.44">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>

CSharpInteractive/CSharpInteractive.Tool.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<ItemGroup>
3131
<PackageReference Include="Microsoft.CodeAnalysis.Scripting" Version="4.12.0-3.final" />
32-
<PackageReference Include="Pure.DI" Version="2.1.43">
32+
<PackageReference Include="Pure.DI" Version="2.1.44">
3333
<PrivateAssets>all</PrivateAssets>
3434
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3535
</PackageReference>

CSharpInteractive/CSharpInteractive.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<ItemGroup>
2424
<PackageReference Include="Microsoft.CodeAnalysis.Scripting" Version="4.12.0-3.final" />
25-
<PackageReference Include="Pure.DI" Version="2.1.43">
25+
<PackageReference Include="Pure.DI" Version="2.1.44">
2626
<PrivateAssets>all</PrivateAssets>
2727
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2828
</PackageReference>

CSharpInteractive/Composition.cs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ private static void Setup()
7171
.Bind().To(_ => DateTime.Now)
7272
.Bind().To(_ => typeof(Composition).Assembly)
7373
.Bind().To(_ => new CSharpParseOptions().LanguageVersion)
74-
.Bind("RuntimePath").To(_ => Path.GetDirectoryName(typeof(object).Assembly.Location) ?? string.Empty)
74+
.Bind(RuntimePath).To(_ => Path.GetDirectoryName(typeof(object).Assembly.Location) ?? string.Empty)
7575
.Bind().To((CancellationTokenSource cancellationTokenSource) => cancellationTokenSource.Token)
76-
.Bind("TargetFrameworkMoniker").To((Assembly assembly) => assembly.GetCustomAttribute<System.Runtime.Versioning.TargetFrameworkAttribute>()?.FrameworkName ?? string.Empty)
76+
.Bind(TargetFrameworkMoniker).To((Assembly assembly) => assembly.GetCustomAttribute<System.Runtime.Versioning.TargetFrameworkAttribute>()?.FrameworkName ?? string.Empty)
7777
.Bind().To(_ => Process.GetCurrentProcess())
78-
.Bind("ModuleFile").To((Process process) => process.MainModule?.FileName ?? string.Empty)
78+
.Bind(ModuleFile).To((Process process) => process.MainModule?.FileName ?? string.Empty)
7979
.Bind().To<ScriptCommandFactory>()
8080
.Bind().To<ReliableBuildContext>()
8181
.Bind().To<ProcessMonitor>()
8282
.Bind().To<ProcessManager>()
83-
.Bind("base").To<BuildContext>()
83+
.Bind(Base).To<BuildContext>()
8484
.Bind().To(_ => MemoryPool<TT>.Shared)
8585
.Bind().To<SourceResolver>()
8686
.Bind().To<MetadataResolver>()
@@ -119,12 +119,12 @@ private static void Setup()
119119
.Bind().To<FileExplorer>()
120120
.Bind().To<Utf8Encoding>()
121121
.Bind().To<BuildOutputProcessor>()
122-
.Bind("default").To<DefaultBuildMessagesProcessor>()
123-
.Bind("custom").To<CustomMessagesProcessor>()
122+
.Bind(Base).To<DefaultBuildMessagesProcessor>()
123+
.Bind(Custom).To<CustomMessagesProcessor>()
124124
.Bind().To<TeamCityContext>()
125125
.Bind().To<SummaryPresenter>()
126126
.Bind().To<ExitCodeParser>()
127-
.Bind("base").To<ProcessRunner>()
127+
.Bind(Base).To<ProcessRunner>()
128128
.Bind().To<ProcessResultHandler>()
129129
.Bind().To<TextReplacer>()
130130
.Bind().To<RuntimeExplorer>()
@@ -133,14 +133,14 @@ private static void Setup()
133133
.Bind().To<Root>()
134134
.Bind().To(_ => new CancellationTokenSource())
135135
.Bind().To<CISpecific<TT>>()
136-
.Bind("Default").To<ConsoleInOut>()
137-
.Bind("TeamCity").To<TeamCityInOut>()
138-
.Bind("Ansi").To<AnsiInOut>()
136+
.Bind(Base).To<ConsoleInOut>()
137+
.Bind(TeamCity).To<TeamCityInOut>()
138+
.Bind(Ansi).To<AnsiInOut>()
139139
.Bind().To<Console>()
140140
.Bind().To((ICISpecific<IStdOut> stdOut) => stdOut.Instance)
141141
.Bind().To((ICISpecific<IStdErr> stdErr) => stdErr.Instance)
142-
.Bind("Default", "Ansi").To<Log<TT>>()
143-
.Bind("TeamCity").To<TeamCityLog<TT>>()
142+
.Bind(Base, Ansi).To<Log<TT>>()
143+
.Bind(TeamCity).To<TeamCityLog<TT>>()
144144
.Bind().To((ICISpecific<ILog<TT>> log) => log.Instance)
145145
.Bind().To<CISettings>()
146146
.Bind().To<ExitTracker>()
@@ -202,8 +202,8 @@ private static void Setup()
202202
.Bind(Unique).To<SettingCommandRunner<VerbosityLevel>>()
203203
.Bind(Unique).To<AddNuGetReferenceCommandFactory>()
204204
.Bind(Unique).To<AddNuGetReferenceCommandRunner>()
205-
.Bind("Default", "Ansi").To<Properties>()
206-
.Bind("TeamCity").To<TeamCityProperties>()
205+
.Bind(Base, Ansi).To<Properties>()
206+
.Bind(TeamCity).To<TeamCityProperties>()
207207
.Bind().To((ICISpecific<IProperties> properties) => properties.Instance)
208208

209209
// Public services
@@ -215,7 +215,8 @@ private static void Setup()
215215
.Bind().To<ServiceMessageFormatter>()
216216
.Bind().To<FlowIdGenerator>()
217217
.Bind().To<TimestampUpdater>()
218-
.Bind().To((ITeamCityServiceMessages teamCityServiceMessages, IConsole console) => teamCityServiceMessages.CreateWriter(str => console.WriteToOut((default, str + "\n"))))
218+
.Bind().To((ITeamCityServiceMessages teamCityServiceMessages, IConsole console)
219+
=> teamCityServiceMessages.CreateWriter(str => console.WriteToOut((null, str + "\n"))))
219220
.Bind().To<ServiceMessageParser>();
220221
}
221222
}

CSharpInteractive/Core/BuildMessageLogWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace CSharpInteractive.Core;
77

88
internal class BuildMessageLogWriter(
99
ILog<BuildMessageLogWriter> log,
10-
[Tag("Default")] IStdOut stdOut,
11-
[Tag("Default")] IStdErr stdErr)
10+
[Tag(Tag.Base)] IStdOut stdOut,
11+
[Tag(Tag.Base)] IStdErr stdErr)
1212
: IBuildMessageLogWriter
1313
{
1414
public void Write(ProcessInfo processInfo, BuildMessage message)

CSharpInteractive/Core/BuildRunner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ internal class BuildRunner(
1717
Func<IBuildContext> buildContextFactory,
1818
IBuildOutputProcessor buildOutputProcessor,
1919
Func<IProcessMonitor> monitorFactory,
20-
[Tag("default")] IBuildMessagesProcessor defaultBuildMessagesProcessor,
21-
[Tag("custom")] IBuildMessagesProcessor customBuildMessagesProcessor,
20+
[Tag(Tag.Base)] IBuildMessagesProcessor defaultBuildMessagesProcessor,
21+
[Tag(Tag.Custom)] IBuildMessagesProcessor customBuildMessagesProcessor,
2222
IProcessResultHandler processResultHandler,
2323
IStartInfoDescription startInfoDescription,
2424
ICommandLineStatisticsRegistry statisticsRegistry)

CSharpInteractive/Core/CISpecific.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ namespace CSharpInteractive.Core;
77

88
internal class CISpecific<T>(
99
ICISettings settings,
10-
[Tag("Default")] Func<T> defaultFactory,
11-
[Tag("TeamCity")] Func<T> teamcityFactory,
12-
[Tag("Ansi")] Func<T> ansiFactory)
10+
[Tag(Tag.Base)] Func<T> defaultFactory,
11+
[Tag(Tag.TeamCity)] Func<T> teamcityFactory,
12+
[Tag(Tag.Ansi)] Func<T> ansiFactory)
1313
: ICISpecific<T>
1414
{
1515
public T Instance => settings.CIType switch

CSharpInteractive/Core/DotnetEnvironment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace CSharpInteractive.Core;
77
using Pure.DI;
88

99
internal class DotNetEnvironment(
10-
[Tag("TargetFrameworkMoniker")] string targetFrameworkMoniker,
11-
[Tag("ModuleFile")] string moduleFile,
10+
[Tag(Tag.TargetFrameworkMoniker)] string targetFrameworkMoniker,
11+
[Tag(Tag.ModuleFile)] string moduleFile,
1212
IEnvironment environment,
1313
IFileExplorer fileExplorer)
1414
: IDotNetEnvironment, ITraceSource

CSharpInteractive/Core/ProcessInFlowRunner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace CSharpInteractive.Core;
88
using Pure.DI;
99

1010
internal class ProcessInFlowRunner(
11-
[Tag("base")] IProcessRunner baseProcessRunner,
11+
[Tag(Tag.Base)] IProcessRunner baseProcessRunner,
1212
ICISettings ciSettings,
1313
ITeamCityWriter teamCityWriter,
1414
IFlowContext flowContext)

CSharpInteractive/Core/ReliableBuildContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal class ReliableBuildContext(
1111
ICISettings ciSettings,
1212
IFileSystem fileSystem,
1313
IMessagesReader messagesReader,
14-
[Tag("base")] IBuildContext baseBuildContext)
14+
[Tag(Tag.Base)] IBuildContext baseBuildContext)
1515
: IBuildContext
1616
{
1717
private readonly Dictionary<string, Output> _sources = new();

0 commit comments

Comments
 (0)