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

WriteStatusCodeArray() public method

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

            PopArray();
        }