Opc.Ua.XmlEncoder.WriteUInt32Array C# (CSharp) Method

WriteUInt32Array() public method

Writes a uint array to the stream.
public WriteUInt32Array ( string fieldName, IList values ) : void
fieldName string
values IList
return void
        public void WriteUInt32Array(string fieldName, IList<uint> values)
        {            
            if (BeginField(fieldName, values == null, true))
            {
                // check the length.
                if (m_context.MaxArrayLength > 0 && m_context.MaxArrayLength < values.Count)
                {
                    throw new ServiceResultException(StatusCodes.BadEncodingLimitsExceeded);
                }

                PushNamespace(Namespaces.OpcUaXsd);

                if (values != null)
                {
                    for (int ii = 0; ii < values.Count; ii++)
                    {
                        WriteUInt32("UInt32", values[ii]);
                    }
                }

                PopNamespace();

                EndField(fieldName);
            }
        }