public bool Verify()
{
//
// All Verify( AbcFile abc ) style methods of sub-elements of the ABC
// format implementation do not return a bool but actually throw exceptions
// in case they find issues with their respective test subjects. The
// exception type should always be AbcVerifierException, in order to
// make sure we intentionally threw it and Blitzableiter crashes if we
// ran into some other problem (which needs to get fixed).
//
try
{
_ConstantPool.Verify(this);
// NOTE: If we ever do performance improvements we should use "for" since it is faster than foreach
foreach (Method_info m in _Method)
{
m.Verify(this);
}
foreach (Metadata_info m in _Metadata)
{
m.Verify(this);
}
foreach (Instance_info i in _Instance)
{
i.Verify(this);
}
foreach (Class_info c in _Class)
{
c.Verify(this);
}
foreach (Script_info s in _Script)
{
s.Verify(this);
}
foreach (UInt32 k in _MethodBody.Keys)
{
_MethodBody[k].Verify(this);
}
}
catch (AbcVerifierException)
{
//
// The exception is already logged when thrown, so we
// can simply return false here
//
return false;
}
//
// All tests passed
//
return true;
}