You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Xml.Serialization;
namespace DQ.Construction.NewLook.DataTemplate
{
/// <summary>
/// DateTemplateMatch
/// </summary>
[XmlRoot(ElementName = "Config")]
public class DateTemplateMatch
{
/// <summary>
/// DateTemplateItem
/// </summary>
[XmlElement(ElementName = "Entry")]
public List<DateTemplateMatchItem> Items { get; set; } = new List<DateTemplateMatchItem>();
}
/// <summary>
/// DateTemplateMatchItem
/// </summary>
public class DateTemplateMatchItem
{
/// <summary>
/// From
/// </summary>
[XmlAttribute(AttributeName = "From")]
public string From { get; set; }
/// <summary>
/// To
/// </summary>
[XmlAttribute(AttributeName = "TO")]
public string To
{
get => this.mTo;
set
{
if (this.mTo != value)
{
this.mTo = value;
this.ToList = this.mTo.Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
}
}
}
[XmlIgnore]
private string mTo;
/// <summary>
/// 获取to列表
/// </summary>
[XmlIgnore]
public string[] ToList { get; private set; }
}
}