protected virtual ServiceResult ProcessBeforeConfirm(
ISystemContext context,
byte[] eventId,
LocalizedText comment)
{
if (eventId == null)
{
return StatusCodes.BadEventIdUnknown;
}
if (!this.EnabledState.Id.Value)
{
return StatusCodes.BadConditionDisabled;
}
if (OnConfirm != null)
{
try
{
return OnConfirm(context, this, eventId, comment);
}
catch (Exception e)
{
return ServiceResult.Create(e, StatusCodes.BadUnexpectedError, "Unexpected error confirming a Condition.");
}
}
return ServiceResult.Good;
}