fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user