Sample Dotnet C#

0 votes


We try to use .NET SDK , but you don't use C#, and try to translate to another language.


We could not use :

DocumentPackage superDuperPackage = PackageBuilder
    .NewPackageNamed("Test Package .NET")

because  .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()) is not accepted.

Have you another method to prepare document ? ( or another sample without abrevation of c# ? )




Reply to: Sample Dotnet C#

0 votes

Hi Dominique,


Thanks for your post! Which version of .NET platform/core and OSS .NET SDK are you developing with?

Below is an example code with .NET platform 4.8 + OSS .NET SDK 11.34 (not the latest):

            OssClient ossClient = new OssClient(apiKey, apiUrl);
            DocumentPackage newPackage = PackageBuilder.NewPackageNamed("Example Package created from new .NET SDK")
                .DescribedAs("It's a test package")
                .WithEmailMessage("Please sign ASAP!")
                .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")
                        .WithSignature(SignatureBuilder.SignatureFor("[email protected]")

            var packageId = ossClient.CreatePackageOneStep(newPackage);
            Debug.WriteLine("packageId: {0}", packageId);


It works either way with or without the commented line.



Duo Liang OneSpan Evangelism and Partner Integrations Developer

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off