Opc.Ua.XmlDecoder.ReadUInt32Array C# (CSharp) Method

ReadUInt32Array() public method

Reads a uint array from the stream.
public ReadUInt32Array ( string fieldName ) : UInt32Collection
fieldName string
return UInt32Collection
        public UInt32Collection ReadUInt32Array(string fieldName)
        {
            bool isNil = false;

            UInt32Collection values = new UInt32Collection();
                                    
            if (BeginField(fieldName, true, out isNil))
            {                                
                PushNamespace(Namespaces.OpcUaXsd);
                
                while (MoveToElement("UInt32"))
                {
                    values.Add(ReadUInt32("UInt32"));
                }

                // check the length.
                if (m_context.MaxArrayLength > 0 && m_context.MaxArrayLength < values.Count)
                {
                    throw new ServiceResultException(StatusCodes.BadEncodingLimitsExceeded);
                }

                PopNamespace();

                EndField(fieldName);
                return values;
            }

            if (isNil)
            {
                return null;
            }

            return values;
        }