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

WriteEncodeableArray() public method

Writes an encodeable object array to the stream.
public WriteEncodeableArray ( string fieldName, IList values, System systemType ) : void
fieldName string
values IList
systemType System
return void
        public void WriteEncodeableArray(string fieldName, IList<IEncodeable> values, System.Type systemType)
        {
            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++)
                {
                    WriteEncodeable(null, values[ii], systemType);
                }
            }

            PopArray();
        }