Produced by Araxis Merge on 9/9/2019 5:42:10 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | Webvram-v4.zip\20190725-webvram-source.zip\Sources\WebVRAM.Web.ng\SignalR | VistaHub.cs | Tue Jul 23 23:11:38 2019 UTC |
2 | Webvram-v4.zip\20190725-webvram-source.zip\Sources\WebVRAM.Web.ng\SignalR | VistaHub.cs | Wed Aug 21 21:20:42 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 140 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | using Syst em; | |
2 | using Syst em.Collect ions.Gener ic; | |
3 | using Syst em.Threadi ng.Tasks; | |
4 | using Micr osoft.AspN etCore.Aut horization ; | |
5 | using Micr osoft.AspN etCore.Sig nalR; | |
6 | using Micr osoft.Exte nsions.Log ging; | |
7 | using WebV RAM.Vista. Models; | |
8 | using WebV RAM.Vista. Service.Mo dels; | |
9 | using WebV RAM.Vista. Services; | |
10 | using WebV RAM.Web.ng .Common; | |
11 | using WebV RAM.Web.ng .Models; | |
12 | ||
13 | namespace WebVRAM.We b.ng.Signa lR | |
14 | { | |
15 | [Autho rize(Authe nticationS chemes = A uthenticat ionSchemes .Jwt, Poli cy = Autho rizationPo licies.Jwt User)] | |
16 | public class Vis taHub : Hu b | |
17 | { | |
18 | pr ivate read only ILogg er _logger ; | |
19 | pr ivate read only SyncS ervice _sy ncService; | |
20 | ||
21 | pu blic Vista Hub(ILogge r<VistaHub > logger, SyncServic e syncServ ice) | |
22 | { | |
23 | _logger = logger; | |
24 | _syncSer vice = syn cService; | |
25 | } | |
26 | ||
27 | pu blic overr ide Task O nConnected Async() | |
28 | { | |
29 | _logger. LogDebug($ "VistaHub connected" ); | |
30 | return b ase.OnConn ectedAsync (); | |
31 | } | |
32 | ||
33 | pu blic overr ide Task O nDisconnec tedAsync(E xception e xception) | |
34 | { | |
35 | _logger. LogDebug(" VistaHub d isconnecte d"); | |
36 | return b ase.OnDisc onnectedAs ync(except ion); | |
37 | } | |
38 | ||
39 | pu blic async Task<Sync hronizatio nResult> S ync(IList< int> vista SiteCodes) | |
40 | { | |
41 | _logger. LogDebug(" VistaHub:: SyncMultip le"); | |
42 | ||
43 | var user = Context .User; | |
44 | ||
45 | var webS ocketClien tIpAddress = Context .GetHttpCo ntext().Co nnection.R emoteIpAdd ress.ToStr ing(); | |
46 | if (webS ocketClien tIpAddress == "::1") | |
47 | { | |
48 | webSocketC lientIpAdd ress = " IP "; | |
49 | } | |
50 | ||
51 | var prog ressDialog = new Pro gress<Prog ressDialog >(async di alog => | |
52 | { | |
53 | _log ger.LogDeb ug($"Vista Hub Progre ss Update: {dialog.P ercentComp lete}, {di alog.Messa ge}"); | |
54 | awai t Clients. Caller.Sen dAsync("up dateProgre ss", dialo g); | |
55 | }); | |
56 | ||
57 | var prog ressLog = new Progre ss<Progres sLog>(asyn c log => | |
58 | { | |
59 | awai t Clients. Caller.Sen dAsync("up dateLog", log); | |
60 | }); | |
61 | ||
62 | var clie ntLauncher = new Act ion<VistaS ession>(as ync vistaS ession => | |
63 | { | |
64 | awai t Clients. Caller.Sen dAsync("cl ientLaunch er", vista Session); | |
65 | }); | |
66 | ||
67 | return a wait _sync Service.Sy nchronizeT oSites(vis taSiteCode s, webSock etClientIp Address, | |
68 | user , clientLa uncher, pr ogressDial og, progre ssLog); | |
69 | } | |
70 | } | |
71 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.