чуток поделал

This commit is contained in:
ivans 2025-02-06 00:07:44 +04:00
parent 76b0ff87cb
commit f88a108f27
4 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SweetBunsContracts.Exceptions;
public class ValidationException(string message) : Exception(message)
{
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SweetBunsContracts.Extensions;
public static class StringExtensions
{
public static bool IsEmpty(this string str)
{
return string.IsNullOrWhiteSpace(str);
}
public static bool IsGuid(this string str)
{
return Guid.TryParse(str, out _);
}
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SweetBunsContracts.Infrastructure;
public class IValidation
{
void Validate();
}

View File

@ -6,4 +6,8 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="DataModels\" />
</ItemGroup>
</Project>