42 lines
1013 B
C#
42 lines
1013 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
|
|
namespace AIMSObjectQuery
|
|
{
|
|
internal partial class ProgramExceptionMap:IMap
|
|
{
|
|
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
|
public ProgramExceptionMap()
|
|
{
|
|
dictionary.Add("id", "Id");
|
|
dictionary.Add("message", "Message");
|
|
dictionary.Add("source", "Source");
|
|
dictionary.Add("stacktrace", "StackTrace");
|
|
dictionary.Add("targetsite", "TargetSite");
|
|
dictionary.Add("ip", "IP");
|
|
dictionary.Add("operatorid", "OperatorId");
|
|
dictionary.Add("exceptiontime", "ExceptionTime");
|
|
}
|
|
|
|
#region IMap 成员
|
|
|
|
public string this[string propertyName]
|
|
{
|
|
get
|
|
{
|
|
try
|
|
{
|
|
return dictionary[propertyName.ToLower()];
|
|
}
|
|
catch (KeyNotFoundException)
|
|
{
|
|
throw new Exception(propertyName + "属性不存在");
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|