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

ReadInt64Array() public method

Reads a long array from the stream.
public ReadInt64Array ( string fieldName ) : Int64Collection
fieldName string
return Int64Collection
        public Int64Collection ReadInt64Array(string fieldName)
        {
            bool isNil = false;

            Int64Collection values = new Int64Collection();
                                    
            if (BeginField(fieldName, true, out isNil))
            {                                
                PushNamespace(Namespaces.OpcUaXsd);
                
                while (MoveToElement("Int64"))
                {
                    values.Add(ReadInt64("Int64"));
                }

                // 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;
        }