Opc.Ua.ViewState.ReadNonValueAttribute C# (CSharp) Method

ReadNonValueAttribute() protected method

Reads the value for any non-value attribute.
protected ReadNonValueAttribute ( ISystemContext context, uint attributeId, object &value ) : ServiceResult
context ISystemContext
attributeId uint
value object
return ServiceResult
        protected override ServiceResult ReadNonValueAttribute(
            ISystemContext context,
            uint attributeId,
            ref object value)
        {
            ServiceResult result = null;

            switch (attributeId)
            {
                case Attributes.EventNotifier:
                {
                    byte eventNotifier = m_eventNotifier;

                    if (OnReadEventNotifier != null)
                    {
                        result = OnReadEventNotifier(context, this, ref eventNotifier);
                    }

                    if (ServiceResult.IsGood(result))
                    {
                        value = eventNotifier;
                    }

                    return result;
                }

                case Attributes.ContainsNoLoops:
                {
                    bool containsNoLoops = m_containsNoLoops;

                    if (OnReadContainsNoLoops != null)
                    {
                        result = OnReadContainsNoLoops(context, this, ref containsNoLoops);
                    }

                    if (ServiceResult.IsGood(result))
                    {
                        value = containsNoLoops;
                    }

                    return result;
                }
            }

            return base.ReadNonValueAttribute(context, attributeId, ref value);
        }
        #endregion