protected virtual void PopInstance(object instance, string prefix)
{
object actual = instanceStack.Pop();
if (actual != instance)
{
throw new BindingException("Unexpected item on the stack: found {0}, expecting {1}", actual, instance);
}
string actualPrefix = prefixStack.Pop();
if (actualPrefix != prefix)
{
throw new BindingException("Unexpected prefix on the stack: found {0}, expecting {1}", actualPrefix, prefix);
}
}