|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace LogViewer
{
public class LogEntry : IPropertyRetriever
{
private DateTime _entryTime;
public string ThreadName { get; set; }
public string LogLevel { get; set; }
public string UserName { get; set; }
public string ComputerName { get; set; }
public string Info { get; set; }
public string ErrorInfo { get; set; }
public int Key { get; set; }
public string SourceLogFile { get; set; }
public string ServerName { get; set; }
public DateTime EntryTime
{
get { return _entryTime; }
set { _entryTime = value; }
}
public object GetPropertyValue(string name)
{
switch (name)
{
case "ThreadName":
return ThreadName;
case "LogLevel":
return LogLevel;
case "UserName":
return UserName;
case "ComputerName":
return ComputerName;
case "Info":
return Info;
case "ErrorInfo":
return ErrorInfo;
case "Key":
return Key;
case "SourceLogFile":
return SourceLogFile;
case "ServerName":
return ServerName;
case "EntryTime":
return EntryTime;
}
return null;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I've been all over the coding world since earning my degrees
have worked in c++ and java, finally setteling into c# about 6 years ago, where i spent a good amount of my time in Performance tweaking & memory debugging, as well as designing new solutions and hacking at old ones to stay in line.
Computers never cease to amaze me, and i'm glad to have found a field where i get paid to do what i enjoy.
I have been toying around with the idea of publishing stuff online for years, never actually getting around to it, so i still have a lot of stuff to write up, aside from all the other new stuff i'll get excited about, hope you'll like enjoy reading it as much as i enjoy writing.
linkedin
google plus