73 lines
1.9 KiB
C#
73 lines
1.9 KiB
C#
|
|
using MainShell.Common;
|
|||
|
|
using System;
|
|||
|
|
|
|||
|
|
namespace MainShell.Vision
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>Ӿ<EFBFBD><D3BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public class VisionProcessResult
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20>Ƿ<EFBFBD>ִ<EFBFBD>гɹ<D0B3>
|
|||
|
|
/// </summary>
|
|||
|
|
public bool Succeeded { get; set; }
|
|||
|
|
|
|||
|
|
public VisionFailureCategory FailureCategory { get; set; }
|
|||
|
|
|
|||
|
|
public VisionErrorCode ErrorCode { get; set; }
|
|||
|
|
|
|||
|
|
public int? AlarmId { get; set; }
|
|||
|
|
|
|||
|
|
public MessageKey UserMessageKey { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD>û<EFBFBD><C3BB>鿴<EFBFBD><E9BFB4><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>Ϣ
|
|||
|
|
/// </summary>
|
|||
|
|
public string Message { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>ʱ<EFBFBD><CAB1><EFBFBD>쳣<EFBFBD><ECB3A3><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public Exception Exception { get; set; }
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public static VisionProcessResult Success()
|
|||
|
|
{
|
|||
|
|
return new VisionProcessResult
|
|||
|
|
{
|
|||
|
|
Succeeded = true,
|
|||
|
|
FailureCategory = VisionFailureCategory.None,
|
|||
|
|
ErrorCode = VisionErrorCode.None,
|
|||
|
|
AlarmId = null,
|
|||
|
|
UserMessageKey = MessageKey.None,
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public static VisionProcessResult Failure(
|
|||
|
|
VisionFailureCategory failureCategory,
|
|||
|
|
VisionErrorCode errorCode,
|
|||
|
|
int? alarmId,
|
|||
|
|
MessageKey userMessageKey,
|
|||
|
|
string message,
|
|||
|
|
Exception exception = null)
|
|||
|
|
{
|
|||
|
|
return new VisionProcessResult
|
|||
|
|
{
|
|||
|
|
Succeeded = false,
|
|||
|
|
FailureCategory = failureCategory,
|
|||
|
|
ErrorCode = errorCode,
|
|||
|
|
AlarmId = alarmId,
|
|||
|
|
UserMessageKey = userMessageKey,
|
|||
|
|
Message = message,
|
|||
|
|
Exception = exception,
|
|||
|
|
};
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|