Coder Social home page Coder Social logo

clicksend-csharp's People

Contributors

jaxom-clicksend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clicksend-csharp's Issues

IO.ClickSend.ClickSend.Model.Email: To property not set

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'

Root namespace: IO

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...

image

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

JsonSubTypes - 1.8.0 or later?

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.)

RestSharp issue

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.

license information

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

Project needs to be upgraded to support RestSharp changes after ver 108.

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.

RestSharp, Version=106.11.7.0

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.

.Net Standard Implementation

Any plans to update this SDK to a .Net Standard implementation so it can be used in a .Net Core application on any platform?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.