Skip to content

Commit

Permalink
feat: update pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
EngRajabi committed May 16, 2024
1 parent fa42f21 commit 001e97b
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 241 deletions.
22 changes: 14 additions & 8 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
CA1054: Change the type of parameter of the method to allow a Uri to be passed as a 'System.Uri' object
CA1055: Change the return type of method from 'string' to 'System.Uri'
-->
<NoWarn>$(NoWarn);SCS0004;MA0016;MA0048;MA0039;MA0025;MA0055;MA0002</NoWarn>
<NoError>$(NoError);SCS0004;MA0016;MA0048;MA0039;MA0025;MA0055;MA0002</NoError>
<NoWarn>
$(NoWarn);SCS0004;MA0016;MA0048;MA0039;MA0025;MA0055;MA0002;CA1002;CA1031;
CA1724;CA1822;CA1860;CA2227
</NoWarn>
<NoError>
$(NoError);SCS0004;MA0016;MA0048;MA0039;MA0025;MA0055;MA0002;CA1002;CA1031;
CA1724;CA1822;CA1860;CA2227
</NoError>
<ReportAnalyzer>true</ReportAnalyzer>
<AnalysisMode>All</AnalysisMode>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand All @@ -37,12 +43,12 @@
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.4.27">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.10.48">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -52,22 +58,22 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Roslynator.Analyzers" Version="4.2.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.12.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.2.0">
<PackageReference Include="Roslynator.CodeAnalysis.Analyzers" Version="4.12.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.2.0">
<PackageReference Include="Roslynator.Formatting.Analyzers" Version="4.12.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

<PackageReference Include="Meziantou.Analyzer" Version="1.0.757">
<PackageReference Include="Meziantou.Analyzer" Version="2.0.150">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
7 changes: 0 additions & 7 deletions MediatR.Useful.Behavior.sln
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Example", "Example", "{0428
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example", "example\Example\Example.csproj", "{3587539F-8313-434A-A9A4-BAAC93BC0DB1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Example3.1", "example\Example3.1\Example3.1.csproj", "{6A646743-82A9-4958-83A4-E69006FDC145}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -50,10 +48,6 @@ Global
{3587539F-8313-434A-A9A4-BAAC93BC0DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3587539F-8313-434A-A9A4-BAAC93BC0DB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3587539F-8313-434A-A9A4-BAAC93BC0DB1}.Release|Any CPU.Build.0 = Release|Any CPU
{6A646743-82A9-4958-83A4-E69006FDC145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A646743-82A9-4958-83A4-E69006FDC145}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A646743-82A9-4958-83A4-E69006FDC145}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A646743-82A9-4958-83A4-E69006FDC145}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -63,7 +57,6 @@ Global
{3B157CBA-46AB-41EB-9E9C-EE6470E2C159} = {9034ACAE-6D26-4B4A-B8E1-6E5C610550E6}
{04282C3C-A3F4-4C71-B391-CC3ADF68F76E} = {EB67E851-A2EA-4731-A3A5-01D615A3AAA2}
{3587539F-8313-434A-A9A4-BAAC93BC0DB1} = {04282C3C-A3F4-4C71-B391-CC3ADF68F76E}
{6A646743-82A9-4958-83A4-E69006FDC145} = {04282C3C-A3F4-4C71-B391-CC3ADF68F76E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5AEA13C4-9243-49C3-B054-D4EDC6898F50}
Expand Down
5 changes: 3 additions & 2 deletions example/Example/Controllers/WeatherForecastController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Example.Command;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using System.Security.Cryptography;

namespace Example.Controllers;
[ApiController]
Expand All @@ -27,8 +28,8 @@ public IEnumerable<WeatherForecast> Get()
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
TemperatureC = RandomNumberGenerator.GetInt32(-20, 55),
Summary = Summaries[RandomNumberGenerator.GetInt32(Summaries.Length)]
})
.ToArray();
}
Expand Down
9 changes: 6 additions & 3 deletions example/Example/Example.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
<PackageReference Include="MediatR" Version="11.1.0" />
<PackageReference Include="MediatR" Version="12.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\MediatR.Useful.Behavior\MediatR.Useful.Behavior.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>

</Project>
4 changes: 1 addition & 3 deletions example/Example/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

using MediatR;
using MediatR.Useful.Behavior.DependencyInjection;

namespace Example;
Expand All @@ -12,7 +10,7 @@ public static void Main(string[] args)

// Add services to the container.

builder.Services.AddMediatR(typeof(Program).Assembly);
builder.Services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(typeof(Program).Assembly));
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
Expand Down
37 changes: 0 additions & 37 deletions example/Example3.1/Controllers/WeatherForecastController.cs

This file was deleted.

17 changes: 0 additions & 17 deletions example/Example3.1/Example3.1.csproj

This file was deleted.

18 changes: 0 additions & 18 deletions example/Example3.1/Program.cs

This file was deleted.

30 changes: 0 additions & 30 deletions example/Example3.1/Properties/launchSettings.json

This file was deleted.

49 changes: 0 additions & 49 deletions example/Example3.1/Startup.cs

This file was deleted.

13 changes: 0 additions & 13 deletions example/Example3.1/WeatherForecast.cs

This file was deleted.

9 changes: 0 additions & 9 deletions example/Example3.1/appsettings.Development.json

This file was deleted.

10 changes: 0 additions & 10 deletions example/Example3.1/appsettings.json

This file was deleted.

Loading

0 comments on commit 001e97b

Please sign in to comment.