From e6769afb3418b93ae0ad48b6425102848937e33b Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 8 May 2026 17:01:38 +0300 Subject: [PATCH] Add span support for email validation, null/empty checks, and predicate guards --- .idea/.idea.SGuard/.idea/workspace.xml | 102 ++++++--- SGuard.sln.DotSettings.user | 17 +- guard/SGuard.csproj | 2 +- guard/SGuard.csproj.DotSettings | 1 + guard/src/Callbacks/SGuardCallback.cs | 16 +- guard/src/Common/ExceptionActivator.cs | 2 +- guard/src/Guards/All/Is.All.cs | 39 ++++ guard/src/Guards/All/ThrowIf.All.cs | 31 +++ guard/src/Guards/Any/Is.Any.cs | 42 ++++ guard/src/Guards/Any/ThrowIf.Any.cs | 22 ++ guard/src/Guards/Email/Is.Email.cs | 70 ++++++ .../src/Guards/NullOrEmpty/Is.NullOrEmpty.cs | 35 +++ .../Guards/NullOrEmpty/ThrowIf.NullOrEmpty.cs | 41 +++- guard/src/Internal/SGuard.cs | 6 +- .../Internal/Visitor/NullOrEmptyVisitor.cs | 15 +- tests/IsAllTests.cs | 66 +++++- tests/IsAnyTests.cs | 134 ++++++++++++ tests/IsEmailTests.cs | 80 +++++++ tests/IsNullOrEmptyTests.cs | 40 +++- tests/NullOrEmptySpanTests.cs | 58 +++++ tests/SGuard.Tests.csproj | 2 +- tests/ThrowIfAllTests.cs | 202 ++++++++++++++++++ tests/ThrowIfAnyTests.cs | 120 +++++++++++ 23 files changed, 1086 insertions(+), 57 deletions(-) create mode 100644 guard/src/Guards/Email/Is.Email.cs create mode 100644 tests/IsEmailTests.cs create mode 100644 tests/NullOrEmptySpanTests.cs create mode 100644 tests/ThrowIfAllTests.cs diff --git a/.idea/.idea.SGuard/.idea/workspace.xml b/.idea/.idea.SGuard/.idea/workspace.xml index a4500f4..485c304 100644 --- a/.idea/.idea.SGuard/.idea/workspace.xml +++ b/.idea/.idea.SGuard/.idea/workspace.xml @@ -6,10 +6,34 @@ + + + + + - - + + + + + + + + + + + + + + + + + + + +