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

WriteInt64Array() public method

Writes a long array to the stream.
public WriteInt64Array ( string fieldName, IList values ) : void
fieldName string
values IList
return void
        public void WriteInt64Array(string fieldName, IList<long> 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++)
                {
                    WriteInt64(null, values[ii]);
                }
            }

            PopArray();
        }