Opc.Ua.JsonDecoder.ReadStatusCode C# (CSharp) Method

ReadStatusCode() public method

Reads an StatusCode from the stream.
public ReadStatusCode ( string fieldName ) : Opc.Ua.StatusCode
fieldName string
return Opc.Ua.StatusCode
        public StatusCode ReadStatusCode(string fieldName)
        {
            object token = null;

            if (!ReadField(fieldName, out token))
            {
                return 0;
            }

            var value = token as string;

            if (value == null)
            {
                return 0;
            }

            int index = value.IndexOf(':');

            if (index >= 0)
            {
                value = value.Substring(index + 1);
            }

            return Convert.ToUInt32(value, 16);
        }