Opc.Ua.Client.DataDictionary.Validate C# (CSharp) Method

Validate() private method

Validates the type dictionary.
private Validate ( byte dictionary ) : void
dictionary byte
return void
        private void Validate(byte[] dictionary)
        {
            MemoryStream istrm = new MemoryStream(dictionary);

            if (m_typeSystemId == Objects.XmlSchema_TypeSystem)
            {
                Schema.Xml.XmlSchemaValidator validator = new Schema.Xml.XmlSchemaValidator();  
                
                try
                {
                    validator.Validate(istrm);
                }
                catch (Exception e)
                {
                    Utils.Trace(e, "Could not validate schema."); 
                }

                m_validator = validator;
            }

            if (m_typeSystemId == Objects.OPCBinarySchema_TypeSystem)
            {
                Schema.Binary.BinarySchemaValidator validator = new Schema.Binary.BinarySchemaValidator();  
                
                try
                {
                    validator.Validate(istrm);
                }
                catch (Exception e)
                {
                    Utils.Trace(e, "Could not validate schema."); 
                }
          
                m_validator = validator;
            }
        }
		#endregion