Opc.Ua.ServiceResult.IsGood C# (CSharp) Method

IsGood() public static method

Returns true if the status code is good.
public static IsGood ( ServiceResult status ) : bool
status ServiceResult
return bool
		public static bool IsGood(ServiceResult status)
		{
			if (status != null)
			{
				return StatusCode.IsGood(status.m_code);
			}

			return true;
		}

Usage Example

コード例 #1
0
        /// <summary>
        /// Updates an audit event after the method is invoked.
        /// </summary>
        protected virtual void UpdateAuditEvent(
            ISystemContext context,
            MethodState causeMethod,
            uint causeId,
            AuditUpdateStateEventState e,
            ServiceResult result)
        {
            TranslationInfo info = new TranslationInfo(
                "StateTransition",
                "en-US",
                "The {1} method called was on the {0} state machine.",
                this.GetDisplayPath(3, '.'),
                causeMethod.DisplayName);

            e.Initialize(
                context,
                this,
                EventSeverity.Medium,
                new LocalizedText(info),
                ServiceResult.IsGood(result),
                DateTime.UtcNow);

            e.MethodId       = new PropertyState <NodeId>(e);
            e.MethodId.Value = causeMethod.NodeId;

            e.SetChildValue(context, BrowseNames.OldStateId, LastState, false);
            e.SetChildValue(context, BrowseNames.NewStateId, CurrentState, false);
        }
All Usage Examples Of Opc.Ua.ServiceResult::IsGood