From 38463273559502ed5e04efb1dfc121167defcda6 Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Sun, 19 May 2024 15:36:43 +0300 Subject: [PATCH] Add BCL types Encoding, Decoder, Encoder --- src/Pure.DI.Core/Features/Default.g.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Pure.DI.Core/Features/Default.g.cs b/src/Pure.DI.Core/Features/Default.g.cs index d2670ece9..b334fadeb 100644 --- a/src/Pure.DI.Core/Features/Default.g.cs +++ b/src/Pure.DI.Core/Features/Default.g.cs @@ -287,7 +287,20 @@ private static void Setup() #if NET6_0_OR_GREATER .Bind().To(_ => global::System.Random.Shared) #endif - ; +#if NETCOREAPP2_0 || NET || NETSTANDARD2_0_OR_GREATER + .Bind().To(_ => global::System.Text.Encoding.Default) +#endif + .Bind().To(ctx => + { + ctx.Inject(out global::System.Text.Encoding encoding); + return encoding.GetDecoder(); + }) + .Bind().To(ctx => + { + ctx.Inject(out global::System.Text.Encoding encoding); + return encoding.GetEncoder(); + }) +; } } }