Opc.Ua.XmlEncoder.WriteDoubleArray C# (CSharp) Method

WriteDoubleArray() public method

Writes a double array to the stream.
public WriteDoubleArray ( string fieldName, IList values ) : void
fieldName string
values IList
return void
        public void WriteDoubleArray(string fieldName, IList<double> values)
        {            
            if (BeginField(fieldName, values == null, true))
            {
                // check the length.
                if (m_context.MaxArrayLength > 0 && m_context.MaxArrayLength < values.Count)
                {
                    throw new ServiceResultException(StatusCodes.BadEncodingLimitsExceeded);
                }

                PushNamespace(Namespaces.OpcUaXsd);

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

                PopNamespace();

                EndField(fieldName);
            }
        }