using DevExpress.Pdf; using EnvelopeGenerator.Application.Common.Enums; namespace EnvelopeGenerator.Infrastructure.Crypt.Helper; public static class PdfCertificationLevelExtensions { public static PdfCertificationLevel ToDevExpress(this PdfSignatureCertificationLevel value) => value switch { PdfSignatureCertificationLevel.NoChangesAllowed => PdfCertificationLevel.NoChangesAllowed, PdfSignatureCertificationLevel.FillForms => PdfCertificationLevel.FillForms, PdfSignatureCertificationLevel.NoCertification => PdfCertificationLevel.NoCertification, PdfSignatureCertificationLevel.FillFormsAndAnnotate => PdfCertificationLevel.FillFormsAndAnnotate, _ => throw new ArgumentOutOfRangeException(nameof(value), value, null), }; }