Skip to content

Commit 3e7f55e

Browse files
committed
Standardize projects and resolve analyzer warnings.
1 parent 7fed44d commit 3e7f55e

43 files changed

Lines changed: 246 additions & 493 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,81 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
3+
<!-- Assembly metadata -->
4+
<Description>Support for pooled instance lifetime scopes in Autofac dependency injection.</Description>
5+
<Copyright>Copyright © 2020 Autofac Contributors</Copyright>
6+
<Authors>Autofac Contributors</Authors>
7+
<Company>Autofac</Company>
8+
<Product>Autofac</Product>
9+
<AssemblyOriginatorKeyFile>../../Autofac.snk</AssemblyOriginatorKeyFile>
10+
<SignAssembly>true</SignAssembly>
11+
<NeutralLanguage>en-US</NeutralLanguage>
12+
<!-- Frameworks and language features -->
413
<TargetFrameworks>net10.0;net8.0;netstandard2.1;netstandard2.0</TargetFrameworks>
5-
<Nullable>enable</Nullable>
614
<LangVersion>latest</LangVersion>
15+
<Nullable>enable</Nullable>
716
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8-
<AssemblyOriginatorKeyFile>../../Autofac.snk</AssemblyOriginatorKeyFile>
9-
<SignAssembly>true</SignAssembly>
1017
<CodeAnalysisRuleSet>../../build/Source.ruleset</CodeAnalysisRuleSet>
11-
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1218
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
13-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
14-
<GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
15-
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
16-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
17-
</PropertyGroup>
18-
19-
<!-- Nuget Options -->
20-
<PropertyGroup>
21-
<Description>Support for pooled instance lifetime scopes in Autofac dependency injection.</Description>
19+
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
<!-- Packaging -->
2222
<PackageTags>autofac;di;ioc;dependencyinjection;pooling</PackageTags>
2323
<PackageReleaseNotes>Release notes are at https://github.com/autofac/Autofac.Pooling/releases</PackageReleaseNotes>
24-
<PackageIconUrl>https://cloud.githubusercontent.com/assets/1156571/13684110/16b8f152-e6bf-11e5-84ae-22c66c6d351a.png</PackageIconUrl>
25-
<PackageProjectUrl>https://autofac.org</PackageProjectUrl>
2624
<PackageIcon>icon.png</PackageIcon>
25+
<PackageProjectUrl>https://autofac.org</PackageProjectUrl>
2726
<PackageLicenseExpression>MIT</PackageLicenseExpression>
28-
<Authors>Autofac Contributors</Authors>
29-
<Company>Autofac</Company>
30-
<Product>Autofac</Product>
27+
<PackageReadmeFile>README.md</PackageReadmeFile>
3128
<RepositoryType>git</RepositoryType>
3229
<RepositoryUrl>https://github.com/autofac/Autofac.Pooling</RepositoryUrl>
30+
<ContinuousIntegrationBuild Condition="'$(CI)' != '' ">true</ContinuousIntegrationBuild>
3331
<PublishRepositoryUrl>true</PublishRepositoryUrl>
3432
<EmbedAllSources>true</EmbedAllSources>
35-
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
33+
<IncludeSymbols>true</IncludeSymbols>
34+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
35+
<!-- OmniSharp/VS Code resource generation -->
36+
<CoreCompileDependsOn>PrepareResources;$(CompileDependsOn)</CoreCompileDependsOn>
3637
</PropertyGroup>
3738
<ItemGroup>
3839
<Using Include="System.Diagnostics.CodeAnalysis" />
3940
</ItemGroup>
4041
<ItemGroup>
4142
<None Include="..\..\build\icon.png" Pack="true" PackagePath="\" />
43+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
4244
</ItemGroup>
4345
<ItemGroup>
4446
<AdditionalFiles Include="..\..\build\stylecop.json" Link="stylecop.json" />
4547
</ItemGroup>
4648
<ItemGroup>
47-
<PackageReference Include="Autofac" Version="9.1.0" />
48-
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="10.0.8" />
49+
<PackageReference Include="Autofac" Version="9.2.0" />
50+
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="10.0.9" />
4951
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.300" Condition="Exists('$(MSBuildThisFileDirectory)../../.git')">
50-
<PrivateAssets>All</PrivateAssets>
51-
</PackageReference>
52-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
53-
<PrivateAssets>All</PrivateAssets>
52+
<PrivateAssets>all</PrivateAssets>
5453
</PackageReference>
5554
<PackageReference Include="SonarAnalyzer.CSharp" Version="10.27.0.140913">
5655
<PrivateAssets>all</PrivateAssets>
5756
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5857
</PackageReference>
58+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
59+
<PrivateAssets>all</PrivateAssets>
60+
</PackageReference>
5961
</ItemGroup>
60-
<ItemGroup>
61-
<Compile Update="PoolGetActivatorResources.Designer.cs">
62-
<DesignTime>True</DesignTime>
63-
<AutoGen>True</AutoGen>
64-
<DependentUpon>PoolGetActivatorResources.resx</DependentUpon>
65-
</Compile>
66-
<Compile Update="PoolServiceResources.Designer.cs">
67-
<DesignTime>True</DesignTime>
68-
<AutoGen>True</AutoGen>
69-
<DependentUpon>PoolServiceResources.resx</DependentUpon>
70-
</Compile>
71-
<Compile Update="RegistrationExtensionsResources.Designer.cs">
72-
<DesignTime>True</DesignTime>
73-
<AutoGen>True</AutoGen>
74-
<DependentUpon>RegistrationExtensionsResources.resx</DependentUpon>
75-
</Compile>
76-
</ItemGroup>
62+
<ItemDefinitionGroup>
63+
<EmbeddedResource>
64+
<Generator>MSBuild:Compile</Generator>
65+
<StronglyTypedLanguage>CSharp</StronglyTypedLanguage>
66+
<StronglyTypedFileName>$(IntermediateOutputPath)%(Filename).Designer.cs</StronglyTypedFileName>
67+
<StronglyTypedClassName>%(Filename)</StronglyTypedClassName>
68+
</EmbeddedResource>
69+
</ItemDefinitionGroup>
7770
<ItemGroup>
7871
<EmbeddedResource Update="PoolGetActivatorResources.resx">
79-
<Generator>ResXFileCodeGenerator</Generator>
80-
<LastGenOutput>PoolGetActivatorResources.Designer.cs</LastGenOutput>
72+
<StronglyTypedNamespace>Autofac.Pooling</StronglyTypedNamespace>
8173
</EmbeddedResource>
8274
<EmbeddedResource Update="PoolServiceResources.resx">
83-
<Generator>ResXFileCodeGenerator</Generator>
84-
<LastGenOutput>PoolServiceResources.Designer.cs</LastGenOutput>
75+
<StronglyTypedNamespace>Autofac.Pooling</StronglyTypedNamespace>
8576
</EmbeddedResource>
8677
<EmbeddedResource Update="RegistrationExtensionsResources.resx">
87-
<Generator>ResXFileCodeGenerator</Generator>
88-
<LastGenOutput>RegistrationExtensionsResources.Designer.cs</LastGenOutput>
78+
<StronglyTypedNamespace>Autofac.Pooling</StronglyTypedNamespace>
8979
</EmbeddedResource>
9080
</ItemGroup>
9181
</Project>

src/Autofac.Pooling/DefaultPooledRegistrationPolicy.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
5-
using System.Collections.Generic;
64
using Autofac.Core;
75

86
namespace Autofac.Pooling;

src/Autofac.Pooling/IPooledComponent.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
5-
using System.Collections.Generic;
64
using Autofac.Core;
75

86
namespace Autofac.Pooling;

src/Autofac.Pooling/IPooledRegistrationPolicy.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
5-
using System.Collections.Generic;
64
using Autofac.Core;
75

86
namespace Autofac.Pooling;

src/Autofac.Pooling/PoolActivator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
54
using Autofac.Core;
65
using Autofac.Core.Resolving.Pipeline;
76
using Microsoft.Extensions.ObjectPool;

src/Autofac.Pooling/PoolGetActivator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
54
using System.Globalization;
65
using Autofac.Core;
76
using Autofac.Core.Resolving.Pipeline;

src/Autofac.Pooling/PoolGetActivatorResources.Designer.cs

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/Autofac.Pooling/PoolService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
54
using System.Globalization;
65
using Autofac.Core;
76
using Microsoft.Extensions.ObjectPool;

src/Autofac.Pooling/PoolServiceResources.Designer.cs

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/Autofac.Pooling/PooledInstanceContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Autofac Project. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
using System;
54
using Microsoft.Extensions.ObjectPool;
65

76
namespace Autofac.Pooling;

0 commit comments

Comments
 (0)