using System;
using System.Xml.Serialization;
namespace WebApplication1
{
/// <summary>
/// 某Log的一条信息的名称和值,Tostring返回一条语句。
/// </summary>
[XmlRoot("property")]
public class LogDetailInfo
{
/// <summary>
/// 名称。
/// </summary>
private string _PropertyName;
/// <summary>
/// 值。
/// </summary>
private string _PropertyValue;
public LogDetailInfo() : this("", "")
{
}
public LogDetailInfo(string name, string Value)
{
_PropertyName = name;
_PropertyValue = Value;
}
[XmlElement("name")]
public string PropertyName
{
get
{
return _PropertyName;
}
set
{
_PropertyName = value;
}
}
[XmlElement("value")]
public string PropertyValue
{
get
{
return _PropertyValue;
}
set
{
_PropertyValue = value;
}
}
/// <summary>
/// 返回名值对的字符串。
/// </summary>
/// <returns></returns>
public override string ToString()
{
return "<b>" + PropertyName + "</b>;" + PropertyValue + "; ";
}
}
}