public void SetBody(Stream body) { if (this.body != null) { throw new InvalidOperationException("Body is already set."); } this.body = body; } }