Skip to content

Commit 3c4142a

Browse files
committed
chore: add GlobalUsings.cs with project-wide using directives in utilities folder
1 parent 767c45a commit 3c4142a

11 files changed

+32
-33
lines changed

Utilities.Tests/Extensions/DictionaryExtensionsTests.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using FluentAssertions;
4-
using NUnit.Framework;
5-
using Utilities.Extensions;
6-
71
namespace Utilities.Tests.Extensions;
82

93
public class DictionaryExtensionsTests

Utilities.Tests/Extensions/MatrixExtensionsTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
using System;
2-
using FluentAssertions;
3-
using NUnit.Framework;
4-
using Utilities.Extensions;
5-
61
namespace Utilities.Tests.Extensions;
72

83
public class MatrixExtensionsTests

Utilities.Tests/Extensions/RandomExtensionsTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
using System;
2-
using FluentAssertions;
3-
using NUnit.Framework;
4-
using Utilities.Extensions;
5-
61
namespace Utilities.Tests.Extensions;
72

83
public class RandomExtensionsTests

Utilities.Tests/Extensions/VectorExtensionsTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
using System;
2-
using FluentAssertions;
3-
using NUnit.Framework;
4-
using Utilities.Extensions;
5-
61
namespace Utilities.Tests.Extensions;
72

83
public class VectorExtensionsTests

Utilities.Tests/GlobalUsings.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// -----------------------------------------------------------------------------
2+
// Global using directives for the C-Sharp solution.
3+
// These namespaces are imported globally so they don’t need to be repeatedly declared
4+
// in individual files, improving readability and reducing boilerplate.
5+
//
6+
// Guidelines:
7+
// - Keep only the most commonly used namespaces here.
8+
// - Add project-specific namespaces (e.g., Utilities.Extensions) only if they are
9+
// required across the majority of files in the project.
10+
// - Avoid placing rarely used namespaces here to maintain clarity.
11+
// -----------------------------------------------------------------------------
12+
13+
global using System; // Core base classes and fundamental types
14+
global using System.Collections.Generic; // Generic collection types (List, Dictionary, etc.)
15+
global using FluentAssertions; // Assertion library for more readable and expressive unit tests
16+
global using NUnit.Framework; // Testing framework providing attributes and assertions for test cases
17+
global using Utilities.Extensions; // Common project-specific extension methods reused across multiple files

Utilities/Exceptions/ItemNotFoundException.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
31
namespace Utilities.Exceptions;
42

53
/// <summary>

Utilities/Extensions/DictionaryExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
41
namespace Utilities.Extensions;
52

63
public static class DictionaryExtensions

Utilities/Extensions/MatrixExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
31
namespace Utilities.Extensions;
42

53
public static class MatrixExtensions

Utilities/Extensions/RandomExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Linq;
3-
41
namespace Utilities.Extensions;
52

63
public static class RandomExtensions

Utilities/Extensions/VectorExtensions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
31
namespace Utilities.Extensions;
42

53
public static class VectorExtensions

0 commit comments

Comments
 (0)