Skip to content

Commit

Permalink
DDCORE-8603 Added CertificateSubjectType to SignatureInfo (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuvorovNM authored Jul 4, 2024
1 parent 0ebd5ff commit 1fb6b8c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Com/CertificateSubjectType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;
using System.Xml.Serialization;

namespace Diadoc.Api.Com
{
[ComVisible(true)]
[Guid("9F6D8CC0-826A-42F9-B3FA-32DC273935EA")]
[XmlType(TypeName = "CertificateSubjectType", Namespace = "https://diadoc-api.kontur.ru")]
public enum CertificateSubjectType
{
UnknownCertificateSubjectType = Proto.Certificates.CertificateSubjectType.UnknownCertificateSubjectType,
LegalEntity = Proto.Certificates.CertificateSubjectType.LegalEntity,
IndividualEntity = Proto.Certificates.CertificateSubjectType.IndividualEntity,
PhysicalPerson = Proto.Certificates.CertificateSubjectType.PhysicalPerson
}
}
4 changes: 4 additions & 0 deletions src/Proto/SignatureInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using Diadoc.Api.Proto.Certificates;

namespace Diadoc.Api.Proto
{
Expand All @@ -22,6 +23,7 @@ public interface ISignatureInfo
string Surname { get; set; }
string Snils { get; set; }
string Email { get; set; }
Com.CertificateSubjectType CertificateSubjectType { get; }
}

[ComVisible(true)]
Expand All @@ -40,5 +42,7 @@ public DateTime SignatureVerificationDateTime
{
get { return new DateTime(SignatureVerificationTime.Ticks, DateTimeKind.Utc); }
}

Com.CertificateSubjectType ISignatureInfo.CertificateSubjectType => (Com.CertificateSubjectType) CertificateSubjectType;
}
}

0 comments on commit 1fb6b8c

Please sign in to comment.