-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add possibility to open multiple chat windows
- Loading branch information
Showing
8 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace VattenMedia.Core.Interfaces | ||
{ | ||
public interface ITwitchChatClientFactory | ||
{ | ||
ITwitchChatClient Create(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
VattenMedia.Infrastructure/Factories/TwitchChatClientFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using VattenMedia.Core.Interfaces; | ||
using VattenMedia.Infrastructure.Services; | ||
|
||
namespace VattenMedia.Infrastructure.Factories | ||
{ | ||
internal class TwitchChatClientFactory : ITwitchChatClientFactory | ||
{ | ||
public ITwitchChatClient Create() | ||
{ | ||
return new TwitchChatClient(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using VattenMedia.ViewModels; | ||
|
||
namespace VattenMedia.Factories | ||
{ | ||
internal interface IViewModelFactory | ||
{ | ||
ChatViewModel CreateChatViewModel(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using VattenMedia.Core.Interfaces; | ||
using VattenMedia.ViewModels; | ||
|
||
namespace VattenMedia.Factories | ||
{ | ||
internal class ViewModelFactory : IViewModelFactory | ||
{ | ||
private readonly ITwitchChatClientFactory twitchChatClientFactory; | ||
|
||
public ViewModelFactory(ITwitchChatClientFactory twitchChatClientFactory) | ||
{ | ||
this.twitchChatClientFactory = twitchChatClientFactory; | ||
} | ||
|
||
public ChatViewModel CreateChatViewModel() | ||
{ | ||
return new ChatViewModel(twitchChatClientFactory.Create()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters