Please see sendgrid-csharp/SendGrid/SendGrid/Helpers/Mail/Mail.cs
public Mail(Email from, String subject, Email to, Content content)
{
this.From = from;
Personalization personalization = new Personalization();
personalization.AddTo(to);
this.AddPersonalization(personalization);
**this.Subject = "Hello World from the SendGrid CSharp Library";**
this.AddContent(content);
}
Should be this...
this.Subject = subject;
Not only is the API awful, but it is full of blunders such as this.
Who's idea was it to make a C# API full of:
dynamic;snake_cased members, that violate every naming convention of the language;async/await;Mail that make it impossible to use object/collection initializers.How is this _at all helpful_ as a C# API?
For now I'll just revert, but if this is the "future", I'll be wrapping the REST API directly through something like Refit.
@digime99 my apologies, I will be fixing that issue shortly. Thank you very much for letting us know!
@ncruces thanks for the specific feedback, it is much appreciated! We rewrote the library to support all v3 web api endpoints and the highly anticipated v3 /mail/send endpoint. This is a starting point and we are listening carefully and will update accordingly. After fixing the bug reported in this ticket, I'll create new tickets to address the other issues you mention. Hopefully we can then dig into the details and continue improvement.
@digime99 this has been fixed in version 7.0.1: https://www.nuget.org/packages/SendGrid
totally agree with ncruces, a full step back!
Hello @critot,
You are correct, this is a full step back, possibly more :)
We would love to have your feedback as we move forward. I'm going to break down ncruces' feedback into separate GitHub issues with specific action items. Your vote and/or comments will matter. In the next few weeks we are taking a _strategic_ step back to determine what the next milestone will be for this library. A major factor will be your feedback along with the rest of the community. Our goal is build this library collaboratively with this community so that it can best serve your needs (generically through the core library and more specifically through helpers). We can only do that if your specific concerns are voiced.
Another point of feedback we would love to learn from is regarding the best way to communicate with this community. We announced the beta back in May, but did not receive much feedback. We hope this changes moving forward. I am heartened by the recent feedback though, we have passionate developers in this community who care as much as we do about this library :)
For now, if you don't want to jump into this version of the library, you can still use v6.3.4: https://www.nuget.org/packages/Sendgrid/6.3.4
Most helpful comment
Not only is the API awful, but it is full of blunders such as this.
Who's idea was it to make a C# API full of:
dynamic;snake_casedmembers, that violate every naming convention of the language;async/await;Mailthat make it impossible to use object/collection initializers.How is this _at all helpful_ as a C# API?
For now I'll just revert, but if this is the "future", I'll be wrapping the REST API directly through something like Refit.