Skip to content

Commit 09f7582

Browse files
committed
Mostly functional implementation. Still behaves *really* weird if you take the database offline from under it.
1 parent b383b47 commit 09f7582

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3095
-500
lines changed

.gitignore

Lines changed: 329 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,329 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5+
6+
# User-specific files
7+
*.suo
8+
*.user
9+
*.userosscache
10+
*.sln.docstates
11+
appsettings.localuser.json
12+
13+
# User-specific files (MonoDevelop/Xamarin Studio)
14+
*.userprefs
15+
16+
# Build results
17+
[Dd]ebug/
18+
[Dd]ebugPublic/
19+
[Rr]elease/
20+
[Rr]eleases/
21+
x64/
22+
x86/
23+
bld/
24+
[Bb]in/
25+
[Oo]bj/
26+
[Ll]og/
27+
28+
# Visual Studio 2015/2017 cache/options directory
29+
.vs/
30+
# Uncomment if you have tasks that create the project's static files in wwwroot
31+
wwwroot/
32+
33+
# Visual Studio 2017 auto generated files
34+
Generated\ Files/
35+
36+
# MSTest test Results
37+
[Tt]est[Rr]esult*/
38+
[Bb]uild[Ll]og.*
39+
40+
# NUNIT
41+
*.VisualState.xml
42+
TestResult.xml
43+
44+
# Build Results of an ATL Project
45+
[Dd]ebugPS/
46+
[Rr]eleasePS/
47+
dlldata.c
48+
49+
# Benchmark Results
50+
BenchmarkDotNet.Artifacts/
51+
52+
# .NET Core
53+
project.lock.json
54+
project.fragment.lock.json
55+
artifacts/
56+
57+
# StyleCop
58+
StyleCopReport.xml
59+
60+
# Files built by Visual Studio
61+
*_i.c
62+
*_p.c
63+
*_i.h
64+
*.ilk
65+
*.meta
66+
*.obj
67+
*.iobj
68+
*.pch
69+
*.pdb
70+
*.ipdb
71+
*.pgc
72+
*.pgd
73+
*.rsp
74+
*.sbr
75+
*.tlb
76+
*.tli
77+
*.tlh
78+
*.tmp
79+
*.tmp_proj
80+
*.log
81+
*.vspscc
82+
*.vssscc
83+
.builds
84+
*.pidb
85+
*.svclog
86+
*.scc
87+
88+
# Chutzpah Test files
89+
_Chutzpah*
90+
91+
# Visual C++ cache files
92+
ipch/
93+
*.aps
94+
*.ncb
95+
*.opendb
96+
*.opensdf
97+
*.sdf
98+
*.cachefile
99+
*.VC.db
100+
*.VC.VC.opendb
101+
102+
# Visual Studio profiler
103+
*.psess
104+
*.vsp
105+
*.vspx
106+
*.sap
107+
108+
# Visual Studio Trace Files
109+
*.e2e
110+
111+
# TFS 2012 Local Workspace
112+
$tf/
113+
114+
# Guidance Automation Toolkit
115+
*.gpState
116+
117+
# ReSharper is a .NET coding add-in
118+
_ReSharper*/
119+
*.[Rr]e[Ss]harper
120+
*.DotSettings.user
121+
122+
# JustCode is a .NET coding add-in
123+
.JustCode
124+
125+
# TeamCity is a build add-in
126+
_TeamCity*
127+
128+
# DotCover is a Code Coverage Tool
129+
*.dotCover
130+
131+
# AxoCover is a Code Coverage Tool
132+
.axoCover/*
133+
!.axoCover/settings.json
134+
135+
# Visual Studio code coverage results
136+
*.coverage
137+
*.coveragexml
138+
139+
# NCrunch
140+
_NCrunch_*
141+
.*crunch*.local.xml
142+
nCrunchTemp_*
143+
144+
# MightyMoose
145+
*.mm.*
146+
AutoTest.Net/
147+
148+
# Web workbench (sass)
149+
.sass-cache/
150+
151+
# Installshield output folder
152+
[Ee]xpress/
153+
154+
# DocProject is a documentation generator add-in
155+
DocProject/buildhelp/
156+
DocProject/Help/*.HxT
157+
DocProject/Help/*.HxC
158+
DocProject/Help/*.hhc
159+
DocProject/Help/*.hhk
160+
DocProject/Help/*.hhp
161+
DocProject/Help/Html2
162+
DocProject/Help/html
163+
164+
# Click-Once directory
165+
publish/
166+
167+
# Publish Web Output
168+
*.[Pp]ublish.xml
169+
*.azurePubxml
170+
# Note: Comment the next line if you want to checkin your web deploy settings,
171+
# but database connection strings (with potential passwords) will be unencrypted
172+
*.pubxml
173+
*.publishproj
174+
175+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
176+
# checkin your Azure Web App publish settings, but sensitive information contained
177+
# in these scripts will be unencrypted
178+
PublishScripts/
179+
180+
# NuGet Packages
181+
*.nupkg
182+
# The packages folder can be ignored because of Package Restore
183+
**/[Pp]ackages/*
184+
# except build/, which is used as an MSBuild target.
185+
!**/[Pp]ackages/build/
186+
# Uncomment if necessary however generally it will be regenerated when needed
187+
#!**/[Pp]ackages/repositories.config
188+
# NuGet v3's project.json files produces more ignorable files
189+
*.nuget.props
190+
*.nuget.targets
191+
192+
# Microsoft Azure Build Output
193+
csx/
194+
*.build.csdef
195+
196+
# Microsoft Azure Emulator
197+
ecf/
198+
rcf/
199+
200+
# Windows Store app package directories and files
201+
AppPackages/
202+
BundleArtifacts/
203+
Package.StoreAssociation.xml
204+
_pkginfo.txt
205+
*.appx
206+
207+
# Visual Studio cache files
208+
# files ending in .cache can be ignored
209+
*.[Cc]ache
210+
# but keep track of directories ending in .cache
211+
!*.[Cc]ache/
212+
213+
# Others
214+
ClientBin/
215+
~$*
216+
*~
217+
*.dbmdl
218+
*.dbproj.schemaview
219+
*.jfm
220+
*.pfx
221+
orleans.codegen.cs
222+
223+
# Including strong name files can present a security risk
224+
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
225+
#*.snk
226+
227+
# Since there are multiple workflows, uncomment next line to ignore bower_components
228+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
229+
#bower_components/
230+
231+
# RIA/Silverlight projects
232+
Generated_Code/
233+
234+
# Backup & report files from converting an old project file
235+
# to a newer Visual Studio version. Backup files are not needed,
236+
# because we have git ;-)
237+
_UpgradeReport_Files/
238+
Backup*/
239+
UpgradeLog*.XML
240+
UpgradeLog*.htm
241+
ServiceFabricBackup/
242+
*.rptproj.bak
243+
244+
# SQL Server files
245+
*.mdf
246+
*.ldf
247+
*.ndf
248+
249+
# Business Intelligence projects
250+
*.rdl.data
251+
*.bim.layout
252+
*.bim_*.settings
253+
*.rptproj.rsuser
254+
255+
# Microsoft Fakes
256+
FakesAssemblies/
257+
258+
# GhostDoc plugin setting file
259+
*.GhostDoc.xml
260+
261+
# Node.js Tools for Visual Studio
262+
.ntvs_analysis.dat
263+
node_modules/
264+
265+
# Visual Studio 6 build log
266+
*.plg
267+
268+
# Visual Studio 6 workspace options file
269+
*.opt
270+
271+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
272+
*.vbw
273+
274+
# Visual Studio LightSwitch build output
275+
**/*.HTMLClient/GeneratedArtifacts
276+
**/*.DesktopClient/GeneratedArtifacts
277+
**/*.DesktopClient/ModelManifest.xml
278+
**/*.Server/GeneratedArtifacts
279+
**/*.Server/ModelManifest.xml
280+
_Pvt_Extensions
281+
282+
# Paket dependency manager
283+
.paket/paket.exe
284+
paket-files/
285+
286+
# FAKE - F# Make
287+
.fake/
288+
289+
# JetBrains Rider
290+
.idea/
291+
*.sln.iml
292+
293+
# CodeRush
294+
.cr/
295+
296+
# Python Tools for Visual Studio (PTVS)
297+
__pycache__/
298+
*.pyc
299+
300+
# Cake - Uncomment if you are using it
301+
# tools/**
302+
# !tools/packages.config
303+
304+
# Tabs Studio
305+
*.tss
306+
307+
# Telerik's JustMock configuration file
308+
*.jmconfig
309+
310+
# BizTalk build output
311+
*.btp.cs
312+
*.btm.cs
313+
*.odx.cs
314+
*.xsd.cs
315+
316+
# OpenCover UI analysis results
317+
OpenCover/
318+
319+
# Azure Stream Analytics local run output
320+
ASALocalRun/
321+
322+
# MSBuild Binary and Structured Log
323+
*.binlog
324+
325+
# NVidia Nsight GPU debugger configuration file
326+
*.nvuser
327+
328+
# MFractors (Xamarin productivity tool) working folder
329+
.mfractor/

demo/DemoServer/ChatHub.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Microsoft.AspNetCore.SignalR;
4+
using Microsoft.Extensions.Logging;
5+
6+
namespace DemoServer
7+
{
8+
public class ChatHub : Hub
9+
{
10+
private readonly ILogger<ChatHub> _logger;
11+
12+
public ChatHub(ILogger<ChatHub> logger)
13+
{
14+
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
15+
}
16+
17+
private string groupId = Guid.Empty.ToString();
18+
19+
public async Task SendMessage(string name, string message)
20+
{
21+
_logger.LogInformation($"{nameof(SendMessage)} called. ConnectionId:{Context.ConnectionId}, Name:{name}, Message:{message}");
22+
await Clients.Group(groupId).SendAsync("BroadcastMessage", name, message);
23+
}
24+
25+
public override async Task OnConnectedAsync()
26+
{
27+
_logger.LogInformation($"{nameof(OnConnectedAsync)} called.");
28+
29+
await base.OnConnectedAsync();
30+
await Groups.AddToGroupAsync(Context.ConnectionId, Guid.Empty.ToString());
31+
}
32+
33+
public override async Task OnDisconnectedAsync(Exception exception)
34+
{
35+
_logger.LogInformation(exception, $"{nameof(OnDisconnectedAsync)} called.");
36+
37+
await base.OnDisconnectedAsync(exception);
38+
await Groups.RemoveFromGroupAsync(Context.ConnectionId, Guid.Empty.ToString());
39+
}
40+
}
41+
}

demo/DemoServer/DemoServer.csproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net5.0</TargetFramework>
5+
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.7" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\..\src\IntelliTect.SignalR.SqlServer\IntelliTect.SignalR.SqlServer.csproj" />
14+
</ItemGroup>
15+
16+
</Project>

0 commit comments

Comments
 (0)