override public void Execute() { DocumentPackage superDuperPackage = PackageBuilder.NewPackageNamed(PackageName) .DescribedAs("This is a package created using the eSignLive SDK") .WithSigner(SignerBuilder.NewSignerWithEmail(email1) .WithCustomId("Client1") .WithFirstName("John") .WithLastName("Smith") .WithTitle("Managing Director") .WithCompany("Acme Inc.")) .WithDocument(DocumentBuilder.NewDocumentNamed(DOCUMENT_NAME) .FromStream(fileStream1, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(email1) .OnPage(0) .AtPosition(100, 100)) .WithData(DocumentAttributesBuilder.NewDocumentAttributes() .AddAttribute(ATTRIBUTE_KEY_1, ATTRIBUTE_1) .AddAttribute(ATTRIBUTE_KEY_2, ATTRIBUTE_2)) .WithData(DocumentAttributesBuilder.NewDocumentAttributes() .AddAttribute(ATTRIBUTE_KEY_3, ATTRIBUTE_3)) ) .Build(); packageId = eslClient.CreatePackage(superDuperPackage); eslClient.SendPackage(packageId); }
public DocumentBuilder WithData(DocumentAttributesBuilder builder) { foreach (var attribute in builder.Build()) { this.data.Add(attribute.Key, attribute.Value); } return(this); }