Opc.Ua.BaseTypeState.WriteNonValueAttribute C# (CSharp) Method

WriteNonValueAttribute() protected method

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

            switch (attributeId)
            {
                case Attributes.IsAbstract:
                {
                    bool? isAbstractRef = value as bool?;

                    if (isAbstractRef == null)
                    {
                        return StatusCodes.BadTypeMismatch;
                    }

                    if ((WriteMask & AttributeWriteMask.IsAbstract) == 0)
                    {
                        return StatusCodes.BadNotWritable;
                    }

                    bool isAbstract = isAbstractRef.Value;

                    if (OnWriteIsAbstract != null)
                    {
                        result = OnWriteIsAbstract(context, this, ref isAbstract);
                    }

                    if (ServiceResult.IsGood(result))
                    {
                        IsAbstract = isAbstract;
                    }

                    return result;
                }
            }

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