-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
937d31c
commit 81ebb9f
Showing
3 changed files
with
77 additions
and
0 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,18 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\FishyFlip\FishyFlip.csproj" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<PublishAot>true</PublishAot> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" /> | ||
</ItemGroup> | ||
</Project> |
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,28 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FishyFlip", "..\..\src\FishyFlip\FishyFlip.csproj", "{48260865-FB6C-4F37-B80B-4CF1F8B52E66}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Jetstream", "Jetstream.csproj", "{D80F3939-6001-4EFE-B574-26771F9B7523}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{48260865-FB6C-4F37-B80B-4CF1F8B52E66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{48260865-FB6C-4F37-B80B-4CF1F8B52E66}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{48260865-FB6C-4F37-B80B-4CF1F8B52E66}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{48260865-FB6C-4F37-B80B-4CF1F8B52E66}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D80F3939-6001-4EFE-B574-26771F9B7523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D80F3939-6001-4EFE-B574-26771F9B7523}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D80F3939-6001-4EFE-B574-26771F9B7523}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D80F3939-6001-4EFE-B574-26771F9B7523}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
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,31 @@ | ||
// <copyright file="Program.cs" company="Drastic Actions"> | ||
// Copyright (c) Drastic Actions. All rights reserved. | ||
// </copyright> | ||
|
||
using FishyFlip; | ||
using Microsoft.Extensions.Logging.Debug; | ||
|
||
Console.WriteLine("Hello, Jetstream!"); | ||
|
||
var debugLog = new DebugLoggerProvider(); | ||
|
||
// You can set a custom url with WithInstanceUrl | ||
var jetstreamBuilder = new ATJetStreamBuilder() | ||
.WithLogger(debugLog.CreateLogger("FishyFlipDebug")); | ||
var atWebProtocol = jetstreamBuilder.Build(); | ||
|
||
atWebProtocol.OnConnectionUpdated += (sender, args) => | ||
{ | ||
Console.WriteLine($"Connection Updated: {args.State}"); | ||
}; | ||
|
||
atWebProtocol.OnRecordReceived += (sender, args) => | ||
{ | ||
Console.WriteLine($"Record Received: {args.Record.Type}"); | ||
}; | ||
|
||
await atWebProtocol.ConnectAsync(); | ||
|
||
var key = Console.ReadKey(); | ||
|
||
await atWebProtocol.CloseAsync(); |