signnow / SignNow.NET

SignNow.Net is the official .NET 4.5+ and .NET Standard class library for the SignNow API. SignNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts.
https://www.signnow.com/developers
MIT License
16 stars 12 forks source link

Unable to use signNowContext.Documents.EditDocumentAsync #145

Closed cryystyy closed 1 year ago

cryystyy commented 1 year ago

I am getting the following error: Unable to cast object of type 'System.Collections.Generic.List1[Infrastructure.Models.SigningDocuments.SignNowFieldDto]' to type 'System.Collections.Generic.List1[SignNow.Net.Interfaces.IFieldEditable]'.

However my class SignNowFieldDto is implementing IFieldEditable.

image

AlexNDRmac commented 1 year ago

Hi @cryystyy I cannot help without small reproducing part of code. It looks like you trying to re-use some parts of SDK without full implementation of specific classes and converters. What is - FieldType in your code? How to make explicit cast from signNow FiledType object to your implementation?

cryystyy commented 1 year ago

It's a problem from my part, actually. after hours of debugging if i deserialize the list of objects i am sending do not properly conver to a list of IFieldEditable even though i cast it. I had to recreate the list in order to have the proper type.