Opc.Ua.AcknowledgeableConditionState.ProcessBeforeConfirm C# (CSharp) Méthode

ProcessBeforeConfirm() protected méthode

Does any processing before adding a comment to a condition.
protected ProcessBeforeConfirm ( ISystemContext context, byte eventId, Opc.Ua.LocalizedText comment ) : ServiceResult
context ISystemContext The system context.
eventId byte The identifier for the event which is the target for the comment.
comment Opc.Ua.LocalizedText The comment.
Résultat ServiceResult
        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;
        }