Opc.Ua.ConditionState.SetComment C# (CSharp) Method

SetComment() public method

Updates the condition after adding a comment.
public SetComment ( ISystemContext context, Opc.Ua.LocalizedText comment, string clientUserId ) : void
context ISystemContext The system context.
comment Opc.Ua.LocalizedText The comment.
clientUserId string The user that added the comment.
return void
        public virtual void SetComment(
            ISystemContext context,
            LocalizedText comment,
            string clientUserId)
        {
            if (this.Comment != null)
            {
                this.Comment.Value = comment;
                this.Comment.SourceTimestamp.Value = DateTime.UtcNow;

                if (this.ClientUserId != null)
                {
                    this.ClientUserId.Value = clientUserId;
                }
            }
        }
        #endregion