Skip to content

Commit

Permalink
Update style
Browse files Browse the repository at this point in the history
  • Loading branch information
usausa committed Apr 30, 2022
1 parent 69d6861 commit 3b8b135
Show file tree
Hide file tree
Showing 102 changed files with 27 additions and 253 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Deterministic>true</Deterministic>
<NoWarn>$(NoWarn),1573,1591,1712</NoWarn>
<MSBuildWarningsAsMessages>SA0001</MSBuildWarningsAsMessages>
Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Controllers/CharacterController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Controllers;

using System.Collections.Generic;

using Example.WebApplication.Models;
using Example.WebApplication.Services;

Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Controllers/ItemController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Controllers;

using System.Collections.Generic;

using Example.WebApplication.Models;
using Example.WebApplication.Services;

Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Controllers/ScopedController.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Controllers;

using System;

using Example.WebApplication.Services;

using Microsoft.AspNetCore.Mvc;
Expand Down
4 changes: 1 addition & 3 deletions Example.WebApplication/Example.WebApplication.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<CodeAnalysisRuleSet>..\Smart.Resolver.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Infrastructure/MetricsFilter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Infrastructure;

using System;

using Example.WebApplication.Services;

using Microsoft.AspNetCore.Mvc;
Expand Down
5 changes: 1 addition & 4 deletions Example.WebApplication/Models/ErrorViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
namespace Example.WebApplication.Models;

using System.Diagnostics.CodeAnalysis;

public class ErrorViewModel
{
[AllowNull]
public string RequestId { get; set; }
public string RequestId { get; set; } = default!;

public bool ShowRequestId => !String.IsNullOrEmpty(RequestId);
}
2 changes: 0 additions & 2 deletions Example.WebApplication/Services/CharacterService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Services;

using System.Collections.Generic;

using Example.WebApplication.Models;

using Smart.Data;
Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Services/MasterService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Services;

using System.Collections.Generic;

using Example.WebApplication.Models;

using Smart.Data;
Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Services/MetricsManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Services;

using System.Threading;

public class MetricsManager
{
private int counter;
Expand Down
2 changes: 0 additions & 2 deletions Example.WebApplication/Services/ScopedObject.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Example.WebApplication.Services;

using System;

using Microsoft.Extensions.Logging;

public sealed class ScopedObject : IDisposable
Expand Down
5 changes: 1 addition & 4 deletions Example.WebApplication/Settings/ProfileSettings.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
namespace Example.WebApplication.Settings;

using System.Diagnostics.CodeAnalysis;

public class ProfileSettings
{
[AllowNull]
public string[] Genders { get; set; }
public string[] Genders { get; set; } = default!;
}
2 changes: 0 additions & 2 deletions Sandbox/BuilderBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace BuilderBenchmark;

using System;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/CombineComplexBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
2 changes: 0 additions & 2 deletions Sandbox/CombineComplexBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace CombineComplexBenchmark;

using System;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/ComplexFactoryBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
2 changes: 0 additions & 2 deletions Sandbox/ComplexFactoryBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace ComplexFactoryBenchmark;

using System;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/FactoryBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
1 change: 0 additions & 1 deletion Sandbox/FactoryBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace FactoryBenchmark;

using System;
using System.Runtime.CompilerServices;

using BenchmarkDotNet.Attributes;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/FuncBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
2 changes: 0 additions & 2 deletions Sandbox/FuncBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace FuncBenchmark;

using System;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/ReflectionNewBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
1 change: 0 additions & 1 deletion Sandbox/ReflectionNewBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace ReflectionNewBenchmark;

using System;
using System.Reflection;

using BenchmarkDotNet.Attributes;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/ScopeBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
4 changes: 0 additions & 4 deletions Sandbox/ScopeBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace ScopeBenchmark;

using System;
using System.Collections.Generic;
using System.Threading;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/TypedFactoryBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
2 changes: 0 additions & 2 deletions Sandbox/TypedFactoryBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace TypedFactoryBenchmark;

using System;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Sandbox/TypedFuncCacheBenchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
2 changes: 0 additions & 2 deletions Sandbox/TypedFuncCacheBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace TypedFuncCacheBenchmark;

using System;

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Columns;
using BenchmarkDotNet.Configs;
Expand Down
2 changes: 0 additions & 2 deletions Smart.Resolver.Benchmark/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(true)]
10 changes: 2 additions & 8 deletions Smart.Resolver.Benchmark/Benchmarks/SmartDefaultBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace Smart.Resolver.Benchmark.Benchmarks;

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

using BenchmarkDotNet.Attributes;

using Microsoft.Extensions.DependencyInjection;
Expand All @@ -14,11 +10,9 @@ namespace Smart.Resolver.Benchmark.Benchmarks;
[Config(typeof(BenchmarkConfig))]
public class SmartDefaultBenchmark
{
[AllowNull]
private SmartResolver resolver;
private SmartResolver resolver = default!;

[AllowNull]
private IServiceProvider provider;
private IServiceProvider provider = default!;

[GlobalSetup]
public void Setup()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
namespace Smart.Resolver.Benchmark.Benchmarks;

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

using BenchmarkDotNet.Attributes;

using Smart.Reflection;
Expand All @@ -12,8 +9,7 @@ namespace Smart.Resolver.Benchmark.Benchmarks;
[Config(typeof(BenchmarkConfig))]
public class SmartUseReflectionBenchmark
{
[AllowNull]
private SmartResolver resolver;
private SmartResolver resolver = default!;

[GlobalSetup]
public void Setup()
Expand Down
3 changes: 1 addition & 2 deletions Smart.Resolver.Benchmark/Classes/Generic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ public interface IGenericObject<T>

public class GenericObject<T> : IGenericObject<T>
{
[AllowNull]
public T Value { get; set; }
public T Value { get; set; } = default!;
}
4 changes: 0 additions & 4 deletions Smart.Resolver.Benchmark/Validator.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace Smart.Resolver.Benchmark;

using System;
using System.Collections.Generic;
using System.Linq;

using Smart.Resolver.Benchmark.Classes;

public static class Validator
Expand Down
2 changes: 0 additions & 2 deletions Smart.Resolver.Extensions.Configuration/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(false)]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netstandard2.1</TargetFrameworks>
Expand All @@ -8,9 +8,9 @@

<PropertyGroup>
<PackageId>Usa.Smart.Resolver.Extensions.Configuration</PackageId>
<Title>Smart.Resolver.Extensions.Configuration .NET</Title>
<Description>Smart container library configuration extensions for .NET</Description>
<Summary>Smart container library configuration extensions for .NET</Summary>
<Title>Smart.Resolver.Extensions.Configuration</Title>
<Description>Smart container library configuration extensions</Description>
<Summary>Smart container library configuration extensions</Summary>
<PackageTags>smart ioc di configuration aspnet aspnetcore</PackageTags>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions Smart.Resolver.Extensions.DependencyInjection/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(false)]
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
namespace Smart.Resolver;

using System;
using System.Collections.Generic;

using Microsoft.Extensions.DependencyInjection;

using Smart.Resolver.Configs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Smart.Resolver;

using System;

using Microsoft.Extensions.DependencyInjection;

public sealed class SmartServiceProviderFactory : IServiceProviderFactory<ResolverConfig>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Smart.Resolver;

using System;

using Microsoft.Extensions.DependencyInjection;

internal sealed class SmartServiceScope : IServiceScope
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netstandard2.1</TargetFrameworks>
Expand All @@ -8,9 +8,9 @@

<PropertyGroup>
<PackageId>Usa.Smart.Resolver.Extensions.DependencyInjection</PackageId>
<Title>Smart.Resolver.Extensions.DependencyInjection .NET</Title>
<Description>Smart container library depenency injection extensions for .NET</Description>
<Summary>Smart container library depenency injection extensions for .NET</Summary>
<Title>Smart.Resolver.Extensions.DependencyInjection</Title>
<Description>Smart container library depenency injection extensions</Description>
<Summary>Smart container library depenency injection extensions</Summary>
<PackageTags>smart ioc di dependencyinjection aspnet aspnetcore</PackageTags>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions Smart.Resolver.Tests/Assembly.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
using System;

[assembly: CLSCompliant(false)]
1 change: 0 additions & 1 deletion Smart.Resolver.Tests/Resolver/BenchmarkTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Smart.Resolver;

using System;
using System.Diagnostics;

using Smart.Resolver.Mocks;
Expand Down
2 changes: 0 additions & 2 deletions Smart.Resolver.Tests/Resolver/ConstraintTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Smart.Resolver;

using System;

using Smart.Resolver.Attributes;
using Smart.Resolver.Bindings;
using Smart.Resolver.Constraints;
Expand Down
4 changes: 1 addition & 3 deletions Smart.Resolver.Tests/Resolver/ProcessorTest.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
namespace Smart.Resolver;

using System;

using Smart.Resolver.Mocks;
using Smart.Resolver.Processors;

Expand Down Expand Up @@ -91,7 +89,7 @@ public sealed class CustomInitializeProcessor : IProcessor
return null;
}

return (_, x) => (x as ICustomInitializable)?.Initialize();
return static (_, x) => (x as ICustomInitializable)?.Initialize();
}
}

Expand Down
3 changes: 0 additions & 3 deletions Smart.Resolver.Tests/Resolver/ProviderTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
namespace Smart.Resolver;

using System.Collections.Generic;
using System.Linq;

using Smart.Collections.Generic;
using Smart.Resolver.Mocks;

Expand Down
Loading

0 comments on commit 3b8b135

Please sign in to comment.