// Convert from API to SDK SenderCompletionReport private Silanis.ESL.SDK.SenderCompletionReport ToSDKSenderCompletionReport(Silanis.ESL.API.SenderCompletionReport apiSenderCompletionReport) { Silanis.ESL.SDK.SenderCompletionReport sdkSenderCompletionReport = new Silanis.ESL.SDK.SenderCompletionReport(); sdkSenderCompletionReport.Sender = new SenderConverter(apiSenderCompletionReport.Sender).ToSDKSender(); return(sdkSenderCompletionReport); }
// Convert from API to SDK SenderCompletionReport private Silanis.ESL.SDK.SenderCompletionReport ToSDKSenderCompletionReport(Silanis.ESL.API.SenderCompletionReport apiSenderCompletionReport) { Silanis.ESL.SDK.SenderCompletionReport sdkSenderCompletionReport = new Silanis.ESL.SDK.SenderCompletionReport(); sdkSenderCompletionReport.Sender = new SenderConverter(apiSenderCompletionReport.Sender).ToSDKSender(); return sdkSenderCompletionReport; }
/// <summary> /// Convert from API CompletionReport to SDK CompletionReport. /// </summary> /// <returns>The SDK completion report.</returns> public Silanis.ESL.SDK.CompletionReport ToSDKCompletionReport() { if (apiCompletionReport == null) { return sdkCompletionReport; } IList<Silanis.ESL.API.SenderCompletionReport> senderCompletionReportList = apiCompletionReport.Senders; if (senderCompletionReportList.Count != 0) { Silanis.ESL.SDK.CompletionReport result = new Silanis.ESL.SDK.CompletionReport(); result.From = apiCompletionReport.From; result.To = apiCompletionReport.To; Silanis.ESL.SDK.SenderCompletionReport sdkSenderCompletionReport = new Silanis.ESL.SDK.SenderCompletionReport(); foreach (Silanis.ESL.API.SenderCompletionReport apiSenderCompletionReport in senderCompletionReportList) { sdkSenderCompletionReport = ToSDKSenderCompletionReport(apiSenderCompletionReport); IList<Silanis.ESL.API.PackageCompletionReport> packageCompletionReportList = apiSenderCompletionReport.Packages; Silanis.ESL.SDK.PackageCompletionReport sdkPackageCompletionReport; foreach (Silanis.ESL.API.PackageCompletionReport apiPackageCompletionReport in packageCompletionReportList) { sdkPackageCompletionReport = ToSDKPackageCompletionReport(apiPackageCompletionReport); IList<Silanis.ESL.API.DocumentsCompletionReport> documentCompletionReportList = apiPackageCompletionReport.Documents; Silanis.ESL.SDK.DocumentsCompletionReport sdkDocumentsCompletionReport; foreach (Silanis.ESL.API.DocumentsCompletionReport apiDocumentsCompletionReport in documentCompletionReportList) { sdkDocumentsCompletionReport = ToSDKDocumentsCompletionReport(apiDocumentsCompletionReport); sdkPackageCompletionReport.AddDocument(sdkDocumentsCompletionReport); } IList<Silanis.ESL.API.SignersCompletionReport> signersCompletionReportList = apiPackageCompletionReport.Signers; Silanis.ESL.SDK.SignersCompletionReport sdkSignersCompletionReport; foreach (Silanis.ESL.API.SignersCompletionReport apiSignersCompletionReport in signersCompletionReportList) { sdkSignersCompletionReport = ToSDKSignersCompletionReport(apiSignersCompletionReport); sdkPackageCompletionReport.AddSigner(sdkSignersCompletionReport); } sdkSenderCompletionReport.AddPackage(sdkPackageCompletionReport); } result.AddSender(sdkSenderCompletionReport); } return result; } return sdkCompletionReport; }
/// <summary> /// Convert from API CompletionReport to SDK CompletionReport. /// </summary> /// <returns>The SDK completion report.</returns> public Silanis.ESL.SDK.CompletionReport ToSDKCompletionReport() { if (apiCompletionReport == null) { return(sdkCompletionReport); } IList <Silanis.ESL.API.SenderCompletionReport> senderCompletionReportList = apiCompletionReport.Senders; if (senderCompletionReportList.Count != 0) { Silanis.ESL.SDK.CompletionReport result = new Silanis.ESL.SDK.CompletionReport(); result.From = apiCompletionReport.From; result.To = apiCompletionReport.To; Silanis.ESL.SDK.SenderCompletionReport sdkSenderCompletionReport = new Silanis.ESL.SDK.SenderCompletionReport(); foreach (Silanis.ESL.API.SenderCompletionReport apiSenderCompletionReport in senderCompletionReportList) { sdkSenderCompletionReport = ToSDKSenderCompletionReport(apiSenderCompletionReport); IList <Silanis.ESL.API.PackageCompletionReport> packageCompletionReportList = apiSenderCompletionReport.Packages; Silanis.ESL.SDK.PackageCompletionReport sdkPackageCompletionReport; foreach (Silanis.ESL.API.PackageCompletionReport apiPackageCompletionReport in packageCompletionReportList) { sdkPackageCompletionReport = ToSDKPackageCompletionReport(apiPackageCompletionReport); IList <Silanis.ESL.API.DocumentsCompletionReport> documentCompletionReportList = apiPackageCompletionReport.Documents; Silanis.ESL.SDK.DocumentsCompletionReport sdkDocumentsCompletionReport; foreach (Silanis.ESL.API.DocumentsCompletionReport apiDocumentsCompletionReport in documentCompletionReportList) { sdkDocumentsCompletionReport = ToSDKDocumentsCompletionReport(apiDocumentsCompletionReport); sdkPackageCompletionReport.AddDocument(sdkDocumentsCompletionReport); } IList <Silanis.ESL.API.SignersCompletionReport> signersCompletionReportList = apiPackageCompletionReport.Signers; Silanis.ESL.SDK.SignersCompletionReport sdkSignersCompletionReport; foreach (Silanis.ESL.API.SignersCompletionReport apiSignersCompletionReport in signersCompletionReportList) { sdkSignersCompletionReport = ToSDKSignersCompletionReport(apiSignersCompletionReport); sdkPackageCompletionReport.AddSigner(sdkSignersCompletionReport); } sdkSenderCompletionReport.AddPackage(sdkPackageCompletionReport); } result.AddSender(sdkSenderCompletionReport); } return(result); } return(sdkCompletionReport); }