Create IPersistence for dependency injection of persistence object.
This commit is contained in:
@@ -4,6 +4,7 @@ using System.Threading;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using VAR.Focus.BusinessLogic;
|
using VAR.Focus.BusinessLogic;
|
||||||
using VAR.Focus.BusinessLogic.Entities;
|
using VAR.Focus.BusinessLogic.Entities;
|
||||||
|
using VAR.Focus.BusinessLogic.Persistence;
|
||||||
using VAR.Focus.Web.Code;
|
using VAR.Focus.Web.Code;
|
||||||
|
|
||||||
namespace VAR.Focus.Web.Controls
|
namespace VAR.Focus.Web.Controls
|
||||||
@@ -64,7 +65,7 @@ namespace VAR.Focus.Web.Controls
|
|||||||
{
|
{
|
||||||
if (_cardBoards.ContainsKey(idBoard) == false)
|
if (_cardBoards.ContainsKey(idBoard) == false)
|
||||||
{
|
{
|
||||||
cardBoard = new CardBoard(idBoard);
|
cardBoard = new CardBoard(idBoard, new JsonFilePersistence());
|
||||||
_cardBoards[idBoard] = cardBoard;
|
_cardBoards[idBoard] = cardBoard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -98,7 +99,7 @@ namespace VAR.Focus.Web.Controls
|
|||||||
{
|
{
|
||||||
if (_cardBoards.ContainsKey(idBoard) == false)
|
if (_cardBoards.ContainsKey(idBoard) == false)
|
||||||
{
|
{
|
||||||
cardBoard = new CardBoard(idBoard);
|
cardBoard = new CardBoard(idBoard, new JsonFilePersistence());
|
||||||
_cardBoards[idBoard] = cardBoard;
|
_cardBoards[idBoard] = cardBoard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Threading;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using VAR.Focus.BusinessLogic;
|
using VAR.Focus.BusinessLogic;
|
||||||
using VAR.Focus.BusinessLogic.Entities;
|
using VAR.Focus.BusinessLogic.Entities;
|
||||||
|
using VAR.Focus.BusinessLogic.Persistence;
|
||||||
using VAR.Focus.Web.Code;
|
using VAR.Focus.Web.Code;
|
||||||
|
|
||||||
namespace VAR.Focus.Web.Controls
|
namespace VAR.Focus.Web.Controls
|
||||||
@@ -64,7 +65,7 @@ namespace VAR.Focus.Web.Controls
|
|||||||
{
|
{
|
||||||
if (_chatBoards.ContainsKey(idMessageBoard) == false)
|
if (_chatBoards.ContainsKey(idMessageBoard) == false)
|
||||||
{
|
{
|
||||||
messageBoard = new MessageBoard(idMessageBoard);
|
messageBoard = new MessageBoard(idMessageBoard, new JsonFilePersistence());
|
||||||
_chatBoards[idMessageBoard] = messageBoard;
|
_chatBoards[idMessageBoard] = messageBoard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,7 +112,7 @@ namespace VAR.Focus.Web.Controls
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
messageBoard = new MessageBoard(idMessageBoard);
|
messageBoard = new MessageBoard(idMessageBoard, new JsonFilePersistence());
|
||||||
_chatBoards[idMessageBoard] = messageBoard;
|
_chatBoards[idMessageBoard] = messageBoard;
|
||||||
}
|
}
|
||||||
messageBoard.Message_Add(userName, text);
|
messageBoard.Message_Add(userName, text);
|
||||||
|
|||||||
Reference in New Issue
Block a user