61 lines
No EOL
1.3 KiB
C#
61 lines
No EOL
1.3 KiB
C#
using System;
|
|
using System.Xml.Serialization;
|
|
|
|
namespace JDSongConverter
|
|
{
|
|
|
|
/// <summary>
|
|
/// Serialize/Deserialize constant key/value couple.
|
|
/// Constant may declare a direct value, or a pattern containing other constant substitution place holders.
|
|
/// Ex:
|
|
/// trkPath="${dataRoot}\${mapName}\${mapName}_${purpose}.trk
|
|
/// Meaning 'trkPath' value represent path aggregation of a data root, a map folder name, and the file name
|
|
/// pattern mixing map name and purpose plus extension.
|
|
/// </summary>
|
|
[Serializable, XmlRoot("Constant")]
|
|
public class Constant
|
|
{
|
|
|
|
#region Constructor
|
|
|
|
public Constant()
|
|
{
|
|
Name = String.Empty;
|
|
Value = String.Empty;
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Public properties
|
|
|
|
[XmlAttribute("name")]
|
|
public string Name { get; set; }
|
|
|
|
[XmlText]
|
|
public string Value { get; set; }
|
|
|
|
#endregion
|
|
}
|
|
|
|
/// <summary>
|
|
/// Serialize/Deserialize an array of 'Constant'.
|
|
/// </summary>
|
|
public class Declarations
|
|
{
|
|
|
|
#region Constructor
|
|
|
|
public Declarations()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Public properties
|
|
|
|
public Constant[] Constants { get; set; }
|
|
|
|
#endregion
|
|
|
|
}
|
|
} |