Commit c2c21b90 authored by Kirill's avatar Kirill

Ipc + Unity test

parent 10a40296
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System.IO; using System.IO;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
using Clifton.Core.Pipes;
using Ninject.Activation.Strategies; using Ninject.Activation.Strategies;
using TourDataManager; using TourDataManager;
using TourDataManager.Entities; using TourDataManager.Entities;
...@@ -18,9 +19,9 @@ namespace TourDataManagerConsoleApplication { ...@@ -18,9 +19,9 @@ namespace TourDataManagerConsoleApplication {
public static void Main(string[] args){ public static void Main(string[] args){
TourDataManagerPlugin = new TourDataManager.TourDataManagerPlugin(PersistentPath); //TourDataManagerPlugin = new TourDataManager.TourDataManagerPlugin(PersistentPath);
CreateServer("Test3");
MainWindow(); //MainWindow();
//tourDataManager.Login(defaultLogin, defaultPassword); //tourDataManager.Login(defaultLogin, defaultPassword);
...@@ -28,6 +29,26 @@ namespace TourDataManagerConsoleApplication { ...@@ -28,6 +29,26 @@ namespace TourDataManagerConsoleApplication {
Console.Read(); Console.Read();
} }
private static ServerPipe CreateServer(string serverName)
{
ServerPipe serverPipe = new ServerPipe(serverName, p => p.StartStringReaderAsync());
serverPipe.DataReceived += (sndr, args) => {
Console.WriteLine($"Server pipe /DataRecieved : {args.String}");
};
serverPipe.Connected += (sndr, args) => {
Console.WriteLine($"Server pipe /Connected : {args}");
};
serverPipe.PipeClosed += (sndr, args) => {
Console.WriteLine($"Server pipe /Closed : {args}");
};
return serverPipe;
}
public static void MainWindow(){ public static void MainWindow(){
Debug.Log("Commands : \n0 - Auth\n1 - Show estates list\n2 - exit"); Debug.Log("Commands : \n0 - Auth\n1 - Show estates list\n2 - exit");
......
...@@ -64,6 +64,10 @@ ...@@ -64,6 +64,10 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Clifton.Core.Pipes\Clifton.Core.Pipes.csproj">
<Project>{b826097c-cc24-4cac-8d31-8a65c4b76be9}</Project>
<Name>Clifton.Core.Pipes</Name>
</ProjectReference>
<ProjectReference Include="..\TourDataManager\TourDataManager.csproj"> <ProjectReference Include="..\TourDataManager\TourDataManager.csproj">
<Project>{a62d5535-a31a-466e-8255-a5e74a98666a}</Project> <Project>{a62d5535-a31a-466e-8255-a5e74a98666a}</Project>
<Name>TourDataManager</Name> <Name>TourDataManager</Name>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment