removing unneeded interfaces

This commit is contained in:
Tommy Parnell
2014-05-07 13:49:18 -07:00
parent df6e4f6095
commit e7f27ce186
9 changed files with 6 additions and 60 deletions

View File

@@ -9,7 +9,7 @@ namespace NOCQ
{
public RedisDataase(){}
public static async Task SaveAlert(IAlert alert, string q)
public static async Task SaveAlert(Alert alert, string q)
{
using (var redis = new RedisClientAsync(q,
Convert.ToInt32(ConfigurationManager.AppSettings["Port"]),

View File

@@ -2,7 +2,7 @@ using System;
namespace NOCQ
{
public class Alert : IAlert
public class Alert
{
public DateTime TimeStamp {get; set;}
public string Source {get;set;}

View File

@@ -1,16 +0,0 @@
using System;
namespace NOCQ
{
public interface IAlert
{
DateTime TimeStamp {get; set;}
string Source {get;set;}
string System {get;set;}
string Service {get;set;}
string Data {get;set;}
string Runbook {get; set;}
string Severity {get;set;}
}
}

View File

@@ -71,10 +71,7 @@
<Compile Include="Imports\DataImports.cs" />
<Compile Include="DB\RedisDataase.cs" />
<Compile Include="Plugins\Email\ParseRule.cs" />
<Compile Include="Plugins\Email\IEmailSetting.cs" />
<Compile Include="Model\Alert.cs" />
<Compile Include="Plugins\Email\IParseRule.cs" />
<Compile Include="Model\IAlert.cs" />
<Compile Include="DB\RedisQueues.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace NOCQ.Plugins.Email
{
public class EmailSettings :IEmailSetting
public class EmailSettings
{
public string Username {get;set;}
public string Password {get;set;}
@@ -12,7 +12,7 @@ namespace NOCQ.Plugins.Email
public string Folder {get;set;}
public bool IsSsl {get;set;}
public int Frequency { get; set; }
public IEnumerable<IParseRule> ParseRules {get;set;}
public IEnumerable<ParseRule> ParseRules {get;set;}
}
}

View File

@@ -1,17 +0,0 @@
using System;
using System.Collections.Generic;
namespace NOCQ.Plugins.Email
{
public interface IEmailSetting
{
string Username {get;set;}
string Password {get;set;}
string Host {get;set;}
int Port {get;set;}
string Folder {get;set;}
bool IsSsl {get;set;}
int Frequency { get; set; }
IEnumerable<IParseRule> ParseRules {get;set;}
}
}

View File

@@ -1,18 +0,0 @@
using System;
namespace NOCQ.Plugins.Email
{
public interface IParseRule
{
string Name { get; set; }
bool Enabled { get; set; }
string From {get;set;}
string Source {get;set;}
string System {get;set;}
string Service {get;set;}
string Data {get;set;}
string Runbook { get; set;}
string Severity {get;set;}
}
}

View File

@@ -16,7 +16,7 @@ namespace NOCQ.Plugins.Email
int port { get; set; }
bool ssl { get; set; }
DateTime lastRun { get; set; }
List<IParseRule> parseRules{ get; set; }
List<ParseRule> parseRules{ get; set; }
public ImapInput (dynamic settings)
{

View File

@@ -2,7 +2,7 @@ using System;
namespace NOCQ.Plugins.Email
{
public class ParseRule : IParseRule
public class ParseRule
{
public string Name { get; set; }
public bool Enabled { get; set; }