From 0ea807b1d186e312ffed6752d4b29338b27d9b71 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 7 May 2014 14:42:03 -0700 Subject: [PATCH] adding fileio permissions, and changes to db access --- src/NOCQ/DB/RedisDatabase.cs | 12 ++++++------ src/NOCQ/Properties/AssemblyInfo.cs | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/NOCQ/DB/RedisDatabase.cs b/src/NOCQ/DB/RedisDatabase.cs index 063a7c0..e0d749f 100644 --- a/src/NOCQ/DB/RedisDatabase.cs +++ b/src/NOCQ/DB/RedisDatabase.cs @@ -9,11 +9,11 @@ namespace NOCQ { public RedisDatabase(){} - public static void SaveAlert(Alert alert, string host, string q) + public static void SaveAlert(Alert alert, string host, string q, int port, int timeout) { using (var redis = new RedisClient(host, - Convert.ToInt32(ConfigurationManager.AppSettings["Port"]), - Convert.ToInt32(ConfigurationManager.AppSettings["Timeout"]) + port, + timeout )) { @@ -24,12 +24,12 @@ namespace NOCQ } - public static Alert GetNextAlert(string host, string q ) + public static Alert GetNextAlert(string host, string q, int port, int timeout ) { using (var redis = new RedisClient(host, - Convert.ToInt32(ConfigurationManager.AppSettings["Port"]), - Convert.ToInt32(ConfigurationManager.AppSettings["Timeout"]) + port, + timeout )) { var ts = redis.RPop(q); diff --git a/src/NOCQ/Properties/AssemblyInfo.cs b/src/NOCQ/Properties/AssemblyInfo.cs index 29cfbc3..9318ac2 100644 --- a/src/NOCQ/Properties/AssemblyInfo.cs +++ b/src/NOCQ/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ using System.Reflection; using System.Runtime.CompilerServices; - +using System.Security.Permissions; // Information about this assembly is defined by the following attributes. // Change them to the values specific to your project. [assembly: AssemblyTitle("NOCQ")] @@ -15,6 +15,7 @@ using System.Runtime.CompilerServices; // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. [assembly: AssemblyVersion("1.0.*")] +[assembly: FileIOPermission] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)]