Opc.Ua.JsonEncoder.WriteUInt64Array C# (CSharp) Method

WriteUInt64Array() public method

Writes a ulong array to the stream.
public WriteUInt64Array ( string fieldName, IList values ) : void
fieldName string
values IList
return void
        public void WriteUInt64Array(string fieldName, IList<ulong> values)
        {
            PushArray(fieldName);

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

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

            PopArray();
        }