Blame view

Vrh.OneMessage/XmlProcessing/DeliveryDefinition.cs 3 KB
ab9f2fbe   Schwirg László   Add project files.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Xml.Linq;
  
  using Vrh.XmlProcessing;
  
  namespace Vrh.OneMessage
  {
      public class DeliveryDefinition : XmlLinqBase
      {
          #region Built'in classes
  
          #region ElementNames class
          /// <summary>
          /// Az XML fájlban ilyen elem nevek találhatóak egy "DeliveryDefinition" elemben.
          /// </summary>
          public new class ElementNames : XmlLinqBase.ElementNames
          {
              /// <summary>
              /// 'ConnectionStringName' elem név.
              /// </summary>
              public const string CONNECTIONSTRINGNAME = "ConnectionStringName";
  
              /// <summary>
              /// 'SendAs' elem név.
              /// </summary>
              public const string SENDAS = "SendAs";
  
              /// <summary>
              /// 'SendCopyTo' elem név.
              /// </summary>
              public const string SENDCOPYTO = "SendCopyTo";
          }
          #endregion ElementNames class
  
          #region AttributeNames static class
          /// <summary>
          /// Az XML fájlban ilyen attribútum nevek találhatóak egy "DeliveryDefinition" elemben.
          /// </summary>
          public static class AttributeNames
          {
              /// <summary>
              /// 'Name' attribútum név.
              /// </summary>
              public const string NAME = "Name";
          }
          #endregion AttributeNames static class
  
          #endregion Built'in classes
  
          #region Properties
  
          /// <summary>
          /// A szállítási definíció neve.
          /// </summary>
          public string Name { get; set; }
  
          /// <summary>
          /// A kapcsolati sztring neve.
          /// </summary>
          public string ConnectionStringName { get; set; }
  
          /// <summary>
          /// A feladó email címe.
          /// </summary>
          public string SendAs { get; set; }
  
          /// <summary>
          /// A másolatot kapók vesszővel elválasztott email cím listája.
          /// </summary>
          public string SendCopyTo { get; set; }
  
          #endregion Properties
  
          #region Constructor
          /// <summary>
          /// Példányosítás egy XElement alapján.
          /// Ha <paramref name="xelement"/> paraméter null, akkor nem történik értékadás
          /// de a példány létrejön.
          /// </summary>
          /// <param name="xelement">Egy "DeliveryDefinition" element objektum.</param>
          public DeliveryDefinition(XElement xelement)
          {
              if (xelement != null)
              {
                  this.Name = GetValue(AttributeNames.NAME, xelement, "", true, true);
                  this.ConnectionStringName = GetValue(xelement.Element(ElementNames.CONNECTIONSTRINGNAME), "", true, true);
                  this.SendAs = GetValue(xelement.Element(ElementNames.SENDAS), "");
                  this.SendCopyTo = GetValue(xelement.Element(ElementNames.SENDCOPYTO), "");
              }
          }
          #endregion Constructor
      }
  }