public VerifyNameIndex ( uint nindex ) : bool | ||
nindex | uint | The constant pool index |
return | bool |
public bool VerifyNameIndex(uint nindex)
{
string testname;
try
{
testname = this.ConstantPool.Strings[(int)nindex];
}
catch (IndexOutOfRangeException)
{
Log.Error(this, "Constant pool index is out of range.");
return false;
}
if (!AbcFile.IsValidIdentifier(testname))
{
Log.Error(this, "\"" + testname + "\" is not valid identifier");
return false;
}
return true;
}
/// <summary> /// /// </summary> /// <param name="abc"></param> public void Verify( AbcFile abc ) { if ( ( !abc.VerifyNameIndex( _Key ) ) || ( !abc.VerifyNameIndex( _Value ) ) ) { AbcVerifierException ave = new AbcVerifierException( "Invalid Key/Value pair: " + _Key.ToString( "d" ) + "/" + _Value.ToString( "d" ) ); Log.Error(this, ave ); throw ave; } }