refactoring
This commit is contained in:
14
Inspectron.Epson/Queue/PrintResult.cs
Normal file
14
Inspectron.Epson/Queue/PrintResult.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
public class PrintResult
|
||||
{
|
||||
public bool Success { get; }
|
||||
public PrintErrorType ErrorType { get; }
|
||||
|
||||
private PrintResult(bool success, PrintErrorType errorType)
|
||||
{
|
||||
Success = success;
|
||||
ErrorType = errorType;
|
||||
}
|
||||
|
||||
public static PrintResult Ok() => new(true, PrintErrorType.None);
|
||||
public static PrintResult Fail(PrintErrorType errorType) => new(false, errorType);
|
||||
}
|
||||
Reference in New Issue
Block a user