-
Notifications
You must be signed in to change notification settings - Fork 40
/
Program.cs
69 lines (55 loc) · 2.1 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MOE.Common;
using System.Threading;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Collections.Concurrent;
using Microsoft.AspNet.Identity.EntityFramework;
using MOE.Common.Business.SiteSecurity;
using Microsoft.AspNet.Identity;
using MOE.Common.Models;
using System.Data.Entity.Validation;
using System.Configuration;
namespace SPMWatchDogNew
{
class Program
{
static void Main(string[] args)
{
DateTime StartTime = DateTime.Today;
// find the analysis timespan
if (args.Length > 0)
{
try
{
StartTime = DateTime.Parse(args[0]);
MOE.Common.Business.WatchDog.WatchDogScan scan =
new MOE.Common.Business.WatchDog.WatchDogScan(StartTime);
scan.StartScan();
}
catch (Exception ex)
{
MOE.Common.Models.Repositories.IApplicationEventRepository errorRepository = MOE.Common.Models.Repositories.ApplicationEventRepositoryFactory.Create();
errorRepository.QuickAdd("FTPFromAllcontrollers", "Signal", "TransferFiles", MOE.Common.Models.ApplicationEvent.SeverityLevels.High, ex.Message);
}
}
else
{
try
{
MOE.Common.Business.WatchDog.WatchDogScan scan =
new MOE.Common.Business.WatchDog.WatchDogScan(StartTime);
scan.StartScan();
}
catch (Exception ex)
{
MOE.Common.Models.Repositories.IApplicationEventRepository errorRepository = MOE.Common.Models.Repositories.ApplicationEventRepositoryFactory.Create();
errorRepository.QuickAdd("FTPFromAllcontrollers", "Signal", "TransferFiles", MOE.Common.Models.ApplicationEvent.SeverityLevels.High, ex.Message);
}
}
}
}
}