Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use global usings #57

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions BookmarkSync.Core.Tests/Entities/AccountTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BookmarkSync.Core.Entities;

namespace BookmarkSync.Core.Tests.Entities;

[TestClass]
Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Core.Tests/Entities/BookmarkTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BookmarkSync.Core.Entities;

namespace BookmarkSync.Core.Tests.Entities;

[TestClass]
Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Core.Tests/Entities/Config/AppTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BookmarkSync.Core.Entities.Config;

namespace BookmarkSync.Core.Tests.Entities.Config;

[TestClass]
Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Core.Tests/Entities/Config/BookmarkingTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BookmarkSync.Core.Entities.Config;

namespace BookmarkSync.Core.Tests.Entities.Config;

[TestClass]
Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Core.Tests/Entities/Config/InstanceTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using BookmarkSync.Core.Entities.Config;

namespace BookmarkSync.Core.Tests.Entities.Config;

[TestClass]
Expand Down
6 changes: 6 additions & 0 deletions BookmarkSync.Core.Tests/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Global using directives

global using BookmarkSync.Core.Entities;
global using BookmarkSync.Core.Entities.Config;
global using BookmarkSync.Core.Tests.Helpers;
global using Microsoft.VisualStudio.TestTools.UnitTesting;
2 changes: 0 additions & 2 deletions BookmarkSync.Core.Tests/Usings.cs

This file was deleted.

2 changes: 0 additions & 2 deletions BookmarkSync.Core/Configuration/ConfigManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Configuration;
using BookmarkSync.Core.Entities.Config;
using CiT.Common.Exceptions;
using Microsoft.Extensions.Configuration;
using Serilog;

namespace BookmarkSync.Core.Configuration;

Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Core/Entities/Config/App.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CiT.Common.Attributes;

namespace BookmarkSync.Core.Entities.Config;

public class App : ConfigurationBase
Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Core/Entities/Config/ConfigurationBase.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using CiT.Common.Validations;

namespace BookmarkSync.Core.Entities.Config;

public class ConfigurationBase
Expand Down
6 changes: 6 additions & 0 deletions BookmarkSync.Core/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Global using directives

global using CiT.Common.Attributes;
global using CiT.Common.Exceptions;
global using CiT.Common.Validations;
global using Serilog;
1 change: 0 additions & 1 deletion BookmarkSync.Core/Utilities/UriUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Text.RegularExpressions;
using Serilog;

namespace BookmarkSync.Core.Utilities;

Expand Down
8 changes: 8 additions & 0 deletions BookmarkSync.Infrastructure.Tests/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Global using directives

global using BookmarkSync.Core.Configuration;
global using BookmarkSync.Infrastructure.Services.Bookmarking;
global using BookmarkSync.Infrastructure.Services.Bookmarking.LinkAce;
global using BookmarkSync.Infrastructure.Services.Bookmarking.Pinboard;
global using Microsoft.Extensions.Configuration;
global using Microsoft.VisualStudio.TestTools.UnitTesting;
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
using BookmarkSync.Core.Configuration;
using BookmarkSync.Infrastructure.Services.Bookmarking;
using BookmarkSync.Infrastructure.Services.Bookmarking.LinkAce;
using BookmarkSync.Infrastructure.Services.Bookmarking.Pinboard;
using Microsoft.Extensions.Configuration;

namespace BookmarkSync.Infrastructure.Tests.Services;

[TestClass]
Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Infrastructure.Tests/Usings.cs

This file was deleted.

6 changes: 6 additions & 0 deletions BookmarkSync.Infrastructure/GlobalUsings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Global using directives

global using BookmarkSync.Core.Configuration;
global using BookmarkSync.Core.Entities;
global using BookmarkSync.Core.Interfaces;
global using Serilog;
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using BookmarkSync.Core.Configuration;
using BookmarkSync.Core.Entities;
using BookmarkSync.Core.Entities.Config;
using BookmarkSync.Core.Interfaces;
using Microsoft.Extensions.Hosting;
using Serilog;

namespace BookmarkSync.Infrastructure.Services.Bookmarking;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Net.Http.Headers;
using System.Net.Mime;
using BookmarkSync.Core;
using BookmarkSync.Core.Configuration;
using BookmarkSync.Core.Interfaces;
using BookmarkSync.Infrastructure.Services.Bookmarking.LinkAce;
using BookmarkSync.Infrastructure.Services.Bookmarking.Pinboard;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text;
using BookmarkSync.Core.Configuration;
using BookmarkSync.Core.Entities;
using BookmarkSync.Core.Interfaces;
using Newtonsoft.Json;
using Serilog;

namespace BookmarkSync.Infrastructure.Services.Bookmarking.LinkAce;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System.Web;
using BookmarkSync.Core.Configuration;
using BookmarkSync.Core.Entities;
using BookmarkSync.Core.Interfaces;
using Serilog;

namespace BookmarkSync.Infrastructure.Services.Bookmarking.Pinboard;

Expand Down
2 changes: 0 additions & 2 deletions BookmarkSync.Infrastructure/Services/Mastodon/ApiClient.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.Net.Http.Headers;
using System.Net.Mime;
using BookmarkSync.Core;
using BookmarkSync.Core.Entities;
using BookmarkSync.Core.Entities.Config;
using Newtonsoft.Json;
using Serilog;

namespace BookmarkSync.Infrastructure.Services.Mastodon;

Expand Down