Example #1
0
        public PackageId CreatePackageOneStep(DocumentPackage package)
        {
            if (!IsSdkVersionSetInPackageData(package))
            {
                SetSdkVersionInPackageData(package);
            }

            Silanis.ESL.API.Package packageToCreate = new DocumentPackageConverter(package).ToAPIPackage();
            foreach (Silanis.ESL.SDK.Document document in package.Documents.Values)
            {
                packageToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(packageToCreate));
            }
            PackageId id = packageService.CreatePackageOneStep(packageToCreate, package.Documents.Values);

            return(id);
        }
Example #2
0
        public PackageId CreatePackageOneStep(DocumentPackage package)
        {
            ValidateSignatures(package);
            if (!IsSdkVersionSetInPackageData(package))
            {
                SetSdkVersionInPackageData(package);
            }

            OneSpanSign.API.Package packageToCreate = new DocumentPackageConverter(package).ToAPIPackage();
            foreach (OneSpanSign.Sdk.Document document in package.Documents)
            {
                packageToCreate.AddDocument(new DocumentConverter(document).ToAPIDocument(packageToCreate));
            }
            PackageId id = packageService.CreatePackageOneStep(packageToCreate, package.Documents);

            return(id);
        }