clicksend / clicksend-csharp Goto Github PK
View Code? Open in Web Editor NEWClickSend c# SDK
ClickSend c# SDK
Hi,
I think there's a bug when using the IO.ClickSend.ClickSend.Model.Email class.
e.g.
var email = new IO.ClickSend.ClickSend.Model.Email
{
To = new List<EmailRecipient> { new EmailRecipient("[email protected]", "myName")},
//... code removed for brevity
};
I get the error:
System.IO.InvalidDataException: 'to is a required property for Email and cannot be null'
The root namespace of this package is IO
, which conflicts badly with System.IO
If we install this package into our company solution, we create 812 build errors such as:
'Path' is not a member of IO
'File' is not a member of IO
'Directoy' is not a member of IO
etc...
This means we simply cannot use this package as we are not willing to update 812 references to System.IO
Thought this was worth pointing out
I suggest changing your root namespace to ClickSend
My code fails if I use JsonSubTypes 1.8.0 from NuGet, complaining it needs 1.2.0 - anyone else get this pls?
It's fine if I select 1.2.0 from NuGet.
(VS2019 latest, Win10, C#, WinForms, .NET Framework 4.8.)
The readme has a note about RestSharp >105.1.0 causing uploads to fail.
The PR in the linked issue was included in RestSharp 106.0.0.
One solution would be to upgrade the dependency on RestSharp to 106.0.0 to get the new overload of AddFile
that includes ContentLength
.
ClickSend targets net45 and RestSharp 106.0.0 requires at least net452, so ClickSend cannot be updated without increasing its target framework.
If it is not feasible to update the target framework of ClickSend, I have an idea to for a workaround, that should be compatible with both 105.1.0
and 106.0.0
Looking in the RestSharp code RestRequest.AddFile
calls RestRequest.Files.Add
and RestRequest.Files
is public.
So in PrepareRequest
it should be possible to replace
foreach (var param in fileParams)
{
request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType);
}
with
request.Files.AddRange(fileParams.Values);
The workaround relies on the assumption that RestRequest.AddFile
continues to just call RestRequest.Files.Add
.
Hi
We are using ClickSend repos which are very helpful.
But there is one issue: most of them dont have any license information.
Could you please update the repo with necessary license information.
Thanks in advance
RestSharp has made a lot of changes including deprecating Execute. The entire project needs to be converted to use ExecuteAsync. There may also be changes needed around setting options as RestClient Options is now readonly and can only be set through the constructor for RestSharp.RestClient.
Hi,
Is there a plan for upgrading this to .net core?
Thank you
the latest nuget package (5.0.64) declares a dependancy on restsharp as RestSharp (>= 105.1.0) but in fact the IO.ClickSend.dll depends on RestSharp, Version=106.11.7.0 so fails at runtime without binding redirects.
Any plans to update this SDK to a .Net Standard implementation so it can be used in a .Net Core application on any platform?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.