This commit is contained in:
2026-06-04 09:44:23 +03:00
parent 4ddab34ad1
commit 033b4fc247
29 changed files with 3661 additions and 59 deletions
+23
View File
@@ -0,0 +1,23 @@
namespace MyOffice.Core;
public class Error
{
private Exception? _exception;
public Error(string message)
{
Message = message;
}
public Error(Exception exception): this(exception.GetType().Name)
{
_exception = exception;
}
public Error(string message, Exception exception): this(message)
{
_exception = exception;
}
public string Message { get; private set;}
}
@@ -0,0 +1,18 @@
namespace MyOffice.Core.Helpers;
using MyOffice.Core.Extensions;
public class RandomizationHelper
{
public static string Generate(int length)
{
var result = "";
while(result.Length < length)
{
result += Guid.NewGuid().ToShort();
}
return result.Substring(0, length);
}
}