static object ValidateIdentifier(object id) { if (id != null && !(id is string || id is ulong || id is Guid || id is byte[])) { throw new AmqpException(ErrorCode.NotAllowed, id.GetType().FullName); } return id; } }