refactor(EnvelopeDocument): Überarbeitung der Klasse EnvelopeDocument für .NET/Framework Kompatibilität
- Hinzugefügt: bedingte Namensraum-Deklaration für NET und NETFRAMEWORK - Konstruktor eingeführt mit Initialisierung von Elements (nur .NET Framework) - Entfernt: Property AddedWhen - Verschoben: FileNameOriginal, IsTempFile, Filename, Filepath, Thumbnail, PageCount → nur verfügbar unter .NET Framework - Entfernt Standardinitialisierung von Elements, stattdessen abhängig von Laufzeitumgebung
This commit is contained in:
parent
12519f06f7
commit
82d4b0e740
@ -4,13 +4,26 @@ using System.Drawing;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||
public class EnvelopeDocument
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||
public class EnvelopeDocument
|
||||
{
|
||||
public EnvelopeDocument()
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
Elements = Enumerable.Empty<DocumentReceiverElement>().ToList();
|
||||
#endif
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
@ -20,17 +33,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; } = 0;
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||
public byte[] ByteData { get; set; }
|
||||
|
||||
public List<DocumentReceiverElement> Elements { get; set; } = new List<DocumentReceiverElement>();
|
||||
|
||||
public List<DocumentReceiverElement> Elements { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public string FileNameOriginal { get; set; }
|
||||
|
||||
@ -48,5 +57,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[NotMapped]
|
||||
public int PageCount { get; set; }
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
Loading…
x
Reference in New Issue
Block a user