This commit is contained in:
2022-01-25 18:30:52 +01:00
parent d7c73a8503
commit 86d13cce04
13 changed files with 594 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="EonaCat.Helpers">
<HintPath>..\..\..\EonaCatHelpers\EonaCat.Helpers\bin\Release\net5.0\EonaCat.Helpers.dll</HintPath>
</Reference>
<Reference Include="NotificationClient">
<HintPath>NotificationClient.dll</HintPath>
</Reference>
<Reference Include="NotificationShared">
<HintPath>NotificationShared.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotificationServer", "NotificationServer.csproj", "{A46BB58A-7823-4ED7-ABEA-852807D46B3B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A46BB58A-7823-4ED7-ABEA-852807D46B3B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56457D21-FB6E-49F9-A912-41A10DDD278A}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,29 @@
using NotificationClient;
using NotificationShared;
namespace EonaCat.Helpers.EonaCat.Notifications
{
class ConnectionSettings : IConnectionSettings
{
public string Address { get => "127.0.0.1"; set => throw new NotImplementedException(); }
public int Port { get => 8888; set => throw new NotImplementedException(); }
public Protocol Protocol { get => Protocol.UDP; set => throw new NotImplementedException(); }
public int MaxConnections { get => 10000; set => throw new NotImplementedException(); }
}
public class test
{
static async Task Main(string[] args)
{
NotificationServiceClient client = new NotificationServiceClient(new ConnectionSettings());
client.OpenConnectionAsync(received);
Console.WriteLine("Press any key to continue...");
Console.ReadKey(true);
}
private static void received(NotificationPayload obj)
{
Console.WriteLine(obj.Message);
}
}
}