11using System ;
2+ using System . Collections ;
3+ using System . Collections . Generic ;
24using System . Configuration ;
35using System . IO ;
6+ using System . Linq ;
47using System . Reflection ;
8+ using System . ServiceModel . Channels ;
59
610namespace Seq . Client . WindowsLogins
711{
@@ -15,6 +19,14 @@ static Config()
1519 LogFolder = ConfigurationManager . AppSettings [ "LogFolder" ] ;
1620 HeartbeatInterval = GetInt ( ConfigurationManager . AppSettings [ "HeartbeatInterval" ] ) ;
1721 IsDebug = GetBool ( ConfigurationManager . AppSettings [ "IsDebug" ] ) ;
22+ ProjectKey = ConfigurationManager . AppSettings [ "ProjectKey" ] ;
23+ Responders = ConfigurationManager . AppSettings [ "Responders" ] ;
24+ Priority = ConfigurationManager . AppSettings [ "Priority" ] ;
25+ Tags = GetArray ( ConfigurationManager . AppSettings [ "Tags" ] ) ;
26+ InitialTimeEstimate = ConfigurationManager . AppSettings [ "InitialTimeEstimate" ] ;
27+ RemainingTimeEstimate = ConfigurationManager . AppSettings [ "RemainingTimeEstimate" ] ;
28+ DueDate = ConfigurationManager . AppSettings [ "DueDate" ] ;
29+
1830 //Must be between 0 and 1 hour in seconds
1931 if ( HeartbeatInterval < 0 || HeartbeatInterval > 3600 )
2032 HeartbeatInterval = 600000 ;
@@ -60,6 +72,13 @@ static Config()
6072 public static string LogFolder { get ; }
6173 public static int HeartbeatInterval { get ; }
6274 public static bool IsDebug { get ; }
75+ public static string ProjectKey { get ; }
76+ public static string Priority { get ; }
77+ public static string Responders { get ; }
78+ public static IEnumerable < string > Tags { get ; }
79+ public static string InitialTimeEstimate { get ; }
80+ public static string RemainingTimeEstimate { get ; }
81+ public static string DueDate { get ; }
6382
6483 /// <summary>
6584 /// Convert the supplied <see cref="object" /> to an <see cref="int" />
@@ -95,5 +114,13 @@ private static bool GetBool(object sourceObject, bool trueIfEmpty = false)
95114
96115 return bool . TryParse ( sourceString , out var destBool ) ? destBool : trueIfEmpty ;
97116 }
117+
118+ private static IEnumerable < string > GetArray ( string value )
119+ {
120+ return ( value ?? "" )
121+ . Split ( new [ ] { ',' } , StringSplitOptions . RemoveEmptyEntries )
122+ . Select ( t => t . Trim ( ) )
123+ . ToArray ( ) ;
124+ }
98125 }
99126}
0 commit comments