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
{
///
/// A "attachment" elem leképezése.
///
public class AttachmentElement : XmlLinqBase
{
#region Built'in classes
#region AttributeNames static class
///
/// XML fájlokban ilyen attribútum nevek találhatóak egy DeliveryDefinition elemben.
///
public static class AttributeNames
{
///
/// 'folder' attribútum név.
///
public const string FOLDER = "Folder";
///
/// 'file' attribútum név.
///
public const string FILE = "File";
}
#endregion AttributeNames static class
#endregion Built'in classes
#region Properties
///
/// A csatolmány mappája.
///
public string Folder { get; set; }
///
/// A csatolmány fájl neve.
///
public string File { get; set; }
#endregion Properties
#region Constructor
///
/// Példányosítás egy XElement alapján.
/// Ha paraméter null, akkor nem történik értékadás
/// de a példány létrejön.
///
/// Egy "attachment" element objektum.
/// Az alapértelmezett mappa neve.
public AttachmentElement(XElement xelement, string defaultFolder = null)
{
if (xelement != null)
{
this.Folder = GetValue(AttributeNames.FOLDER, xelement, defaultFolder??"");
this.File = GetValue(AttributeNames.FILE, xelement, "");
}
}
#endregion Constructor
}
}