Persistence: Remove implementation specific usage.

This commit is contained in:
2015-09-28 23:43:28 +02:00
parent 6989c710ad
commit e1021685be
6 changed files with 9 additions and 8 deletions

View File

@@ -101,7 +101,7 @@ namespace VAR.Focus.Web.Code.BusinessLogic
#region Persistence #region Persistence
private const string BoardsPersistenceFile = "priv/boards.json"; private const string BoardsPersistenceFile = "boards";
private void LoadData() private void LoadData()
{ {

View File

@@ -245,8 +245,8 @@ namespace VAR.Focus.Web.Code.BusinessLogic
#region Persistence #region Persistence
private const string CardsPersistenceFile = "priv/cardBoard.{0}.json"; private const string CardsPersistenceFile = "cardBoard.{0}";
private const string EventsPersistenceFile = "priv/cardEvents.{0}.json"; private const string EventsPersistenceFile = "cardEvents.{0}";
private void LoadData() private void LoadData()
{ {

View File

@@ -63,7 +63,7 @@ namespace VAR.Focus.Web.Code.BusinessLogic
#region Persistence #region Persistence
private const string PersistenceFile = "priv/messageBoard.{0}.json"; private const string PersistenceFile = "messageBoard.{0}";
private void LoadData() private void LoadData()
{ {

View File

@@ -43,7 +43,7 @@ namespace VAR.Focus.Web.Code.BusinessLogic
parser.KnownTypes.Add(type); parser.KnownTypes.Add(type);
} }
} }
string filePath = GetLocalPath(file); string filePath = GetLocalPath(string.Format("priv/{0}.json", file));
if (File.Exists(filePath) == false) { return listResult; } if (File.Exists(filePath) == false) { return listResult; }
string strJsonUsers = File.ReadAllText(filePath); string strJsonUsers = File.ReadAllText(filePath);
@@ -66,7 +66,8 @@ namespace VAR.Focus.Web.Code.BusinessLogic
{ {
JSONWriter writter = new JSONWriter(true); JSONWriter writter = new JSONWriter(true);
string strJsonUsers = writter.Write(data); string strJsonUsers = writter.Write(data);
File.WriteAllText(GetLocalPath(file), strJsonUsers); string filePath = GetLocalPath(string.Format("priv/{0}.json", file));
File.WriteAllText(filePath, strJsonUsers);
return true; return true;
} }

View File

@@ -130,7 +130,7 @@ namespace VAR.Focus.Web.Code.BusinessLogic
#region Persistence #region Persistence
private const string PersistenceFile = "priv/sessions.json"; private const string PersistenceFile = "sessions";
private void LoadData() private void LoadData()
{ {

View File

@@ -127,7 +127,7 @@ namespace VAR.Focus.Web.Code.BusinessLogic
#region Persistence #region Persistence
private const string PersistenceFile = "priv/users.json"; private const string PersistenceFile = "users";
private void LoadData() private void LoadData()
{ {