Skip to content

Commit ef7fab8

Browse files
Merge pull request #242 from AntonioFalcao/release
Updating
2 parents 5b5b7be + 2b71c1a commit ef7fab8

File tree

134 files changed

+2522
-2691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+2522
-2691
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup .NET Core
1414
uses: actions/setup-dotnet@v1
1515
with:
16-
dotnet-version: 6.0.100-preview.4.21255.9
16+
dotnet-version: 6.0.100
1717
- name: Install dependencies
1818
run: dotnet restore -v m
1919
- name: Build
@@ -28,6 +28,6 @@ jobs:
2828
- name: Setup .NET Core
2929
uses: actions/setup-dotnet@v1
3030
with:
31-
dotnet-version: 6.0.100-preview.4.21255.9
31+
dotnet-version: 6.0.100
3232
- name: Test
3333
run: dotnet test --no-restore -v m

.gitignore

Lines changed: 38 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ mono_crash.*
2323
[Rr]eleases/
2424
x64/
2525
x86/
26+
[Ww][Ii][Nn]32/
2627
[Aa][Rr][Mm]/
2728
[Aa][Rr][Mm]64/
2829
bld/
2930
[Bb]in/
3031
[Oo]bj/
3132
[Ll]og/
33+
[Ll]ogs/
3234

3335
# Visual Studio 2015/2017 cache/options directory
3436
.vs/
@@ -42,9 +44,10 @@ Generated\ Files/
4244
[Tt]est[Rr]esult*/
4345
[Bb]uild[Ll]og.*
4446

45-
# NUNIT
47+
# NUnit
4648
*.VisualState.xml
4749
TestResult.xml
50+
nunit-*.xml
4851

4952
# Build Results of an ATL Project
5053
[Dd]ebugPS/
@@ -59,6 +62,9 @@ project.lock.json
5962
project.fragment.lock.json
6063
artifacts/
6164

65+
# ASP.NET Scaffolding
66+
ScaffoldingReadMe.txt
67+
6268
# StyleCop
6369
StyleCopReport.xml
6470

@@ -84,6 +90,7 @@ StyleCopReport.xml
8490
*.tmp_proj
8591
*_wpftmp.csproj
8692
*.log
93+
*.tlog
8794
*.vspscc
8895
*.vssscc
8996
.builds
@@ -125,9 +132,6 @@ _ReSharper*/
125132
*.[Rr]e[Ss]harper
126133
*.DotSettings.user
127134

128-
# JustCode is a .NET coding add-in
129-
.JustCode
130-
131135
# TeamCity is a build add-in
132136
_TeamCity*
133137

@@ -138,6 +142,11 @@ _TeamCity*
138142
.axoCover/*
139143
!.axoCover/settings.json
140144

145+
# Coverlet is a free, cross platform Code Coverage Tool
146+
coverage*.json
147+
coverage*.xml
148+
coverage*.info
149+
141150
# Visual Studio code coverage results
142151
*.coverage
143152
*.coveragexml
@@ -185,6 +194,8 @@ PublishScripts/
185194

186195
# NuGet Packages
187196
*.nupkg
197+
# NuGet Symbol Packages
198+
*.snupkg
188199
# The packages folder can be ignored because of Package Restore
189200
**/[Pp]ackages/*
190201
# except build/, which is used as an MSBuild target.
@@ -195,6 +206,9 @@ PublishScripts/
195206
*.nuget.props
196207
*.nuget.targets
197208

209+
# Nuget personal access tokens and Credentials
210+
# nuget.config
211+
198212
# Microsoft Azure Build Output
199213
csx/
200214
*.build.csdef
@@ -260,7 +274,9 @@ ServiceFabricBackup/
260274
*.bim.layout
261275
*.bim_*.settings
262276
*.rptproj.rsuser
263-
*- Backup*.rdl
277+
*- [Bb]ackup.rdl
278+
*- [Bb]ackup ([0-9]).rdl
279+
*- [Bb]ackup ([0-9][0-9]).rdl
264280

265281
# Microsoft Fakes
266282
FakesAssemblies/
@@ -343,91 +359,30 @@ healthchecksdb
343359
# Backup folder for Package Reference Convert tool in Visual Studio 2017
344360
MigrationBackup/
345361

346-
##
347-
## Visual studio for Mac
348-
##
362+
# Ionide (cross platform F# VS Code tools) working folder
363+
.ionide/
349364

365+
# Fody - auto-generated XML schema
366+
FodyWeavers.xsd
350367

351-
# globs
352-
Makefile.in
353-
*.userprefs
354-
*.usertasks
355-
config.make
356-
config.status
357-
aclocal.m4
358-
install-sh
359-
autom4te.cache/
360-
*.tar.gz
361-
tarballs/
362-
test-results/
363-
364-
# Mac bundle stuff
365-
*.dmg
366-
*.app
367-
368-
# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
369-
# General
370-
.DS_Store
371-
.AppleDouble
372-
.LSOverride
373-
374-
# Icon must end with two \r
375-
Icon
376-
377-
378-
# Thumbnails
379-
._*
380-
381-
# Files that might appear in the root of a volume
382-
.DocumentRevisions-V100
383-
.fseventsd
384-
.Spotlight-V100
385-
.TemporaryItems
386-
.Trashes
387-
.VolumeIcon.icns
388-
.com.apple.timemachine.donotpresent
389-
390-
# Directories potentially created on remote AFP share
391-
.AppleDB
392-
.AppleDesktop
393-
Network Trash Folder
394-
Temporary Items
395-
.apdisk
396-
397-
# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore
398-
# Windows thumbnail cache files
399-
Thumbs.db
400-
ehthumbs.db
401-
ehthumbs_vista.db
402-
403-
# Dump file
404-
*.stackdump
405-
406-
# Folder config file
407-
[Dd]esktop.ini
408-
409-
# Recycle Bin used on file shares
410-
$RECYCLE.BIN/
411-
412-
# Windows Installer files
368+
# VS Code files for those working on multiple tools
369+
.vscode/*
370+
!.vscode/settings.json
371+
!.vscode/tasks.json
372+
!.vscode/launch.json
373+
!.vscode/extensions.json
374+
*.code-workspace
375+
376+
# Local History for Visual Studio Code
377+
.history/
378+
379+
# Windows Installer files from build outputs
413380
*.cab
414381
*.msi
415382
*.msix
416383
*.msm
417384
*.msp
418385

419-
# Windows shortcuts
420-
*.lnk
421-
422386
# JetBrains Rider
423387
.idea/
424-
*.sln.iml
425-
426-
##
427-
## Visual Studio Code
428-
##
429-
.vscode/*
430-
!.vscode/settings.json
431-
!.vscode/tasks.json
432-
!.vscode/launch.json
433-
!.vscode/extensions.json
388+
*.sln.iml

Directory.Build.props

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
<Project>
2-
2+
33
<PropertyGroup Label="Common properties">
4+
<Product>Dotnet6.GraphQL4.WebApplication</Product>
5+
<Copyright>Copyright 2021-2021 Antônio Falcão Jr.</Copyright>
6+
<Authors>Antônio Falcão Jr.</Authors>
47
<TargetFramework>net6.0</TargetFramework>
5-
<LangVersion>9</LangVersion>
8+
<LangVersion>10</LangVersion>
69
</PropertyGroup>
710

811
<PropertyGroup Label="Packages dependency versions">
@@ -31,7 +34,7 @@
3134
<HealthChecks_Version>5.0.1</HealthChecks_Version>
3235

3336
<!--Others-->
34-
<FluentValidation_Version>10.3.4</FluentValidation_Version>
37+
<FluentValidation_Version>10.3.5</FluentValidation_Version>
3538
<Scrutor_Version>3.3.0</Scrutor_Version>
3639

3740
</PropertyGroup>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "6.0.100-preview.4.21255.9"
3+
"version": "6.0.100"
44
}
55
}

src/Dotnet6.GraphQL4.CrossCutting/Application.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
using System.Reflection;
44
using Microsoft.Extensions.DependencyModel;
55

6-
namespace Dotnet6.GraphQL4.CrossCutting
6+
namespace Dotnet6.GraphQL4.CrossCutting;
7+
8+
public static class Application
79
{
8-
public static class Application
9-
{
10-
public static string Prefix { get; } = Assembly.GetEntryAssembly()?.FullName?[..16];
10+
public static string Prefix { get; } = Assembly.GetEntryAssembly()?.FullName?[..16];
1111

12-
public static IEnumerable<Assembly> Assemblies { get; } =
13-
DependencyContext.Default.RuntimeLibraries
14-
.Where(library => library.Name.Contains(Prefix))
15-
.SelectMany(library => library.GetDefaultAssemblyNames(DependencyContext.Default))
16-
.Select(Assembly.Load);
17-
}
12+
public static IEnumerable<Assembly> Assemblies { get; } =
13+
DependencyContext.Default.RuntimeLibraries
14+
.Where(library => library.Name.Contains(Prefix))
15+
.SelectMany(library => library.GetDefaultAssemblyNames(DependencyContext.Default))
16+
.Select(Assembly.Load);
1817
}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
using Dotnet6.GraphQL4.CrossCutting.Notifications;
22
using Microsoft.Extensions.DependencyInjection;
33

4-
namespace Dotnet6.GraphQL4.CrossCutting.DependencyInjection.Extensions
4+
namespace Dotnet6.GraphQL4.CrossCutting.DependencyInjection.Extensions;
5+
6+
public static class ServiceCollectionExtensions
57
{
6-
public static class ServiceCollectionExtensions
7-
{
8-
public static IServiceCollection AddNotificationContext(this IServiceCollection services)
9-
=> services.AddScoped<INotificationContext, NotificationContext>();
10-
}
8+
public static IServiceCollection AddNotificationContext(this IServiceCollection services)
9+
=> services.AddScoped<INotificationContext, NotificationContext>();
1110
}

src/Dotnet6.GraphQL4.CrossCutting/Notifications/INotificationContext.cs

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@
44
using FluentValidation.Results;
55
using GraphQL;
66

7-
namespace Dotnet6.GraphQL4.CrossCutting.Notifications
7+
namespace Dotnet6.GraphQL4.CrossCutting.Notifications;
8+
9+
public interface INotificationContext
810
{
9-
public interface INotificationContext
10-
{
11-
ExecutionErrors ExecutionErrors { get; }
12-
IReadOnlyList<Notification> Notifications { get; }
13-
bool AllValid { get; }
14-
Task<bool> AllValidAsync { get; }
15-
bool HasNotifications { get; }
16-
Task<bool> HasNotificationsAsync { get; }
11+
ExecutionErrors ExecutionErrors { get; }
12+
IReadOnlyList<Notification> Notifications { get; }
13+
bool AllValid { get; }
14+
Task<bool> AllValidAsync { get; }
15+
bool HasNotifications { get; }
16+
Task<bool> HasNotificationsAsync { get; }
1717

18-
void AddNotification(string message, string key = default);
19-
void AddNotification(Notification notification);
20-
void AddNotifications(IEnumerable<Notification> notifications);
21-
void AddNotifications(ValidationResult validationResult);
22-
void AddNotificationWithId(string message, object id);
23-
void AddNotificationWithType(string message, Type type);
24-
}
18+
void AddNotification(string message, string key = default);
19+
void AddNotification(Notification notification);
20+
void AddNotifications(IEnumerable<Notification> notifications);
21+
void AddNotifications(ValidationResult validationResult);
22+
void AddNotificationWithId(string message, object id);
23+
void AddNotificationWithType(string message, Type type);
2524
}
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
namespace Dotnet6.GraphQL4.CrossCutting.Notifications
1+
namespace Dotnet6.GraphQL4.CrossCutting.Notifications;
2+
3+
public class Notification
24
{
3-
public class Notification
5+
public Notification(string key, string message)
46
{
5-
public Notification(string key, string message)
6-
{
7-
Key = key;
8-
Message = message;
9-
}
10-
11-
public string Key { get; }
12-
public string Message { get; }
7+
Key = key;
8+
Message = message;
139
}
10+
11+
public string Key { get; }
12+
public string Message { get; }
1413
}

0 commit comments

Comments
 (0)