ATMLSchemaLibrary.managers.SchemaManager.Validate C# (CSharp) Method

Validate() public static method

public static Validate ( string nameSpace, string elementName, object testSubject, SchemaValidationResult schemaValidationResult ) : bool
nameSpace string
elementName string
testSubject object
schemaValidationResult SchemaValidationResult
return bool
        public static bool Validate( string nameSpace, string elementName, object testSubject,
            SchemaValidationResult schemaValidationResult)
        {
            bool isValid = true;
            XmlSchemaComplexType complexType;
            XmlSchemaElement element;
            if (GetComplexType( nameSpace, elementName, out complexType ))
            {
                isValid &= ValidateComplexType( complexType, testSubject, schemaValidationResult );
            }
            else
            {
                if (Instance._schemaTypes.ContainsKey( nameSpace + ":" + elementName ))
                {
                    int i = 0;
                }
                if (GetElement( nameSpace, elementName, out element ))
                {
                    isValid &= ValidateElement( element, testSubject, schemaValidationResult );
                }
            }
            return !schemaValidationResult.HasErrors();
        }