Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Diagnostics;
- namespace GetLogs
- {
- public class Eventlogs
- {
- string eventLog;
- public string EventLog
- {
- get { return eventLog; }
- set { eventLog = value; }
- }
- public Eventlogs()
- {
- }
- }
- public class GetEvents
- {
- public static List<EventLog> GetLogTypes(string computername)
- {
- EventLog[] remoteEventLogs;
- remoteEventLogs = EventLog.GetEventLogs(computername);
- int lognums = remoteEventLogs.Length;
- for (int i = 0; i < lognums; i++)
- foreach(string logtype in remoteEventLogs[i].Log) { }
- }
- public static List<EventLog> GetEventLogs(string logtype, string computername)
- {
- //logType can be Application, Security, System or any other Custom Log.
- List<Eventlogs> log = new List<Eventlogs>();
- List<Eventlogs> logtypes = new List<Eventlogs>();
- GetEvents ev = new GetEvents();
- return ev;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment