protected override void ExecuteStatement(ExecutionContext context)
{
var obj = context.DirectAccess.FindObject(ObjectName);
if (obj == null)
throw new ObjectNotFoundException(ObjectName);
if (!context.User.HasGrantOption(obj.ObjectInfo.ObjectType, obj.ObjectInfo.FullName, Privileges))
throw new SecurityException(String.Format("User '{0}' cannot revoke '{1}' privilege from '{2}' on '{3}'.",
context.User.Name, Privileges, Grantee, ObjectName));
context.DirectAccess.Revoke(obj.ObjectInfo.ObjectType, obj.ObjectInfo.FullName, Grantee, Privileges, GrantOption);
}