From e917f6ee809d14bda6f5059cedf2c3fda20eda98 Mon Sep 17 00:00:00 2001 From: real-zony Date: Fri, 4 Jun 2021 23:16:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B5=8B=E8=AF=95=E5=9F=BA=E7=B1=BB?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8D=95=E7=8B=AC=E5=BE=97=20GetService()=20=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ZonyLrcTools.Tests/TestBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ZonyLrcTools.Tests/TestBase.cs b/tests/ZonyLrcTools.Tests/TestBase.cs index ffdd77f..a005a46 100644 --- a/tests/ZonyLrcTools.Tests/TestBase.cs +++ b/tests/ZonyLrcTools.Tests/TestBase.cs @@ -28,5 +28,10 @@ namespace ZonyLrcTools.Tests } protected virtual void BuildServiceProvider() => ServiceProvider = ServiceCollection.BuildServiceProvider(); + + protected TService GetService() + { + return ServiceProvider.GetRequiredService(); + } } } \ No newline at end of file