Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolayPianikov committed Jan 29, 2025
1 parent 1d8c24b commit edc61fe
Showing 27 changed files with 28 additions and 62 deletions.
3 changes: 3 additions & 0 deletions Pure.DI.sln
Original file line number Diff line number Diff line change
@@ -43,6 +43,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pure.DI.Benchmarks", "benchmarks\Pure.DI.Benchmarks\Pure.DI.Benchmarks.csproj", "{14E31F31-7ADE-4E29-942E-DA6964667645}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{FA80D231-C641-4A49-99C6-0C065D818B07}"
ProjectSection(SolutionItems) = preProject
samples\Directory.Build.props = samples\Directory.Build.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShroedingersCat", "samples\ShroedingersCat\ShroedingersCat.csproj", "{43931C52-536B-49C7-B146-6C0C450C75B2}"
EndProject
1 change: 0 additions & 1 deletion samples/AvaloniaApp/AvaloniaApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<OutputType>WinExe</OutputType>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
3 changes: 0 additions & 3 deletions samples/AvaloniaSimpleApp/AvaloniaSimpleApp.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
6 changes: 1 addition & 5 deletions samples/BlazorServerApp/BlazorServerApp.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<ProjectReference Include="..\WeatherForecast\WeatherForecast.csproj"/>
<ProjectReference Include="..\Clock\Clock.csproj" />
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
</ItemGroup>

</Project>
6 changes: 1 addition & 5 deletions samples/BlazorWebAssemblyApp/BlazorWebAssemblyApp.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<ProjectReference Include="..\WeatherForecast\WeatherForecast.csproj"/>
<ProjectReference Include="..\Clock\Clock.csproj"/>
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.1" PrivateAssets="all" />
</ItemGroup>
3 changes: 1 addition & 2 deletions samples/Clock.Tests/Clock.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<IsTestProject>True</IsTestProject>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="Shouldly" Version="4.2.1"/>
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
5 changes: 0 additions & 5 deletions samples/Clock/Clock.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ImplicitUsings>false</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
<InternalsVisibleTo Include="Clock.Tests" />
12 changes: 12 additions & 0 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project>

<Import Project="..\Directory.Build.props"/>

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<IsPackable>false</IsPackable>
<ApplicationIcon>../../docs/icon.ico</ApplicationIcon>
</PropertyGroup>

</Project>

8 changes: 2 additions & 6 deletions samples/GrpcService/GrpcService.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<Protobuf Include="Protos\greet.proto" GrpcServices="Server"/>
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<PackageReference Include="Grpc.AspNetCore" Version="2.67.0" />
</ItemGroup>

8 changes: 1 addition & 7 deletions samples/MinimalWebAPI/MinimalWebAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<ProjectReference Include="..\WeatherForecast\WeatherForecast.csproj"/>
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion samples/ShroedingersCat/ShroedingersCat.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>Sample</RootNamespace>
</PropertyGroup>
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<PublishAot>true</PublishAot>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<OutputType>Exe</OutputType>
<RootNamespace>Sample</RootNamespace>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RootNamespace>Sample</RootNamespace>
</PropertyGroup>
1 change: 0 additions & 1 deletion samples/SingleRootAvaloniaApp/SingleRootAvaloniaApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
<OutputType>WinExe</OutputType>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
6 changes: 1 addition & 5 deletions samples/WeatherForecast/WeatherForecast.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
</PropertyGroup>


<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.1" />
</ItemGroup>
6 changes: 1 addition & 5 deletions samples/WebAPI/WebAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<ProjectReference Include="..\WeatherForecast\WeatherForecast.csproj" />
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
</ItemGroup>
6 changes: 1 addition & 5 deletions samples/WebApp/WebApp.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>$(BaseTargetFramework)</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
<ProjectReference Include="..\WeatherForecast\WeatherForecast.csproj" />
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<ProjectReference Include="..\..\src\Pure.DI\Pure.DI.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
<Compile Include="..\..\src\Pure.DI.MS\any\Pure.DI\MS\*.cs" Link=""/>
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion samples/WinFormsAppNetCore/WinFormsAppNetCore.csproj
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
<TargetFramework>$(BaseTargetFramework)-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>../../docs/icon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
1 change: 0 additions & 1 deletion samples/WpfAppNetCore/WpfAppNetCore.csproj
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
<TargetFramework>$(BaseTargetFramework)-windows</TargetFramework>
<OutputType>WinExe</OutputType>
<UseWPF>true</UseWPF>
<ApplicationIcon>../../docs/icon.ico</ApplicationIcon>
</PropertyGroup>

<ItemGroup>
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
<Import Project="..\Directory.Build.props"/>

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageIcon>common\icon.png</PackageIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\DevTeam.snk</AssemblyOriginatorKeyFile>
1 change: 0 additions & 1 deletion src/Pure.DI.Core/Pure.DI.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>$(BasePackageId)</RootNamespace>
<DefineConstants>$(DefineConstants);PUREDI_API_SUPPRESSION;PUREDI_API_V2</DefineConstants>
</PropertyGroup>
1 change: 0 additions & 1 deletion src/Pure.DI.MS/Pure.DI.MS.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Library>MS</Library>
<Description>Tools for working with Microsoft DI using $(BasePackageId). $(Description)</Description>
<DefineConstants>$(DefineConstants);PUREDI_NET_ANY</DefineConstants>
1 change: 0 additions & 1 deletion src/Pure.DI.Templates/Pure.DI.Templates.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageType>Template</PackageType>
<PackageId>Pure.DI.Templates</PackageId>
<Title>Pure DI project templates</Title>
1 change: 0 additions & 1 deletion src/Pure.DI/Pure.DI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>$(BasePackageId) is not a framework or library, but a source code generator for creating object graphs. To make them accurate, the developer uses a set of intuitive hints from the Pure.DI API. During the compilation phase, Pure.DI determines the optimal graph structure, checks its correctness, and generates partial class code to create object graphs in the Pure DI paradigm using only basic language constructs. The resulting generated code is robust, works everywhere, throws no exceptions, does not depend on .NET library calls or .NET reflections, is efficient in terms of performance and memory consumption, and is subject to all optimizations. This code can be easily integrated into an application because it does not use unnecessary delegates, additional calls to any methods, type conversions, boxing/unboxing, etc.</Description>
<PackageId>$(BasePackageId)</PackageId>
<IsPackable>true</IsPackable>
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(AnalyzerRoslynPackageVersion)" PrivateAssets="all"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Shouldly" Version="4.2.1"/>
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
2 changes: 1 addition & 1 deletion tests/Pure.DI.Tests/Pure.DI.Tests.csproj
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Pure.DI.Core\Pure.DI.Core.csproj"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="Shouldly" Version="4.2.1"/>
<PackageReference Include="Shouldly" Version="4.3.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<PrivateAssets>all</PrivateAssets>
1 change: 1 addition & 0 deletions tests/Pure.DI.UsageTests/Pure.DI.UsageTests.csproj
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="9.0.1" />
<PackageReference Update="Shouldly" Version="4.3.0" />
</ItemGroup>

</Project>

0 comments on commit edc61fe

Please sign in to comment.