com.wallstop-studios.dxmessaging 2.0.0-rc09 → 2.0.0-rc10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,42 +33,39 @@
|
|
|
33
33
|
|
|
34
34
|
public RegistrationLog Log => _log;
|
|
35
35
|
|
|
36
|
+
private readonly Dictionary<Type, SortedList<int, Dictionary<MessageHandler, int>>> _sinks =
|
|
37
|
+
new();
|
|
36
38
|
private readonly Dictionary<
|
|
37
39
|
Type,
|
|
38
|
-
|
|
39
|
-
> _sinks = new();
|
|
40
|
-
private readonly Dictionary<
|
|
41
|
-
Type,
|
|
42
|
-
Dictionary<InstanceId, SortedDictionary<int, Dictionary<MessageHandler, int>>>
|
|
40
|
+
Dictionary<InstanceId, SortedList<int, Dictionary<MessageHandler, int>>>
|
|
43
41
|
> _targetedSinks = new();
|
|
44
42
|
|
|
45
43
|
private readonly Dictionary<
|
|
46
44
|
Type,
|
|
47
|
-
Dictionary<InstanceId,
|
|
45
|
+
Dictionary<InstanceId, SortedList<int, Dictionary<MessageHandler, int>>>
|
|
48
46
|
> _broadcastSinks = new();
|
|
49
47
|
private readonly Dictionary<
|
|
50
48
|
Type,
|
|
51
|
-
|
|
49
|
+
SortedList<int, Dictionary<MessageHandler, int>>
|
|
52
50
|
> _postProcessingSinks = new();
|
|
53
51
|
private readonly Dictionary<
|
|
54
52
|
Type,
|
|
55
|
-
Dictionary<InstanceId,
|
|
53
|
+
Dictionary<InstanceId, SortedList<int, Dictionary<MessageHandler, int>>>
|
|
56
54
|
> _postProcessingTargetedSinks = new();
|
|
57
55
|
private readonly Dictionary<
|
|
58
56
|
Type,
|
|
59
|
-
Dictionary<InstanceId,
|
|
57
|
+
Dictionary<InstanceId, SortedList<int, Dictionary<MessageHandler, int>>>
|
|
60
58
|
> _postProcessingBroadcastSinks = new();
|
|
61
59
|
private readonly Dictionary<
|
|
62
60
|
Type,
|
|
63
|
-
|
|
61
|
+
SortedList<int, Dictionary<MessageHandler, int>>
|
|
64
62
|
> _postProcessingTargetedWithoutTargetingSinks = new();
|
|
65
63
|
private readonly Dictionary<
|
|
66
64
|
Type,
|
|
67
|
-
|
|
65
|
+
SortedList<int, Dictionary<MessageHandler, int>>
|
|
68
66
|
> _postProcessingBroadcastWithoutSourceSinks = new();
|
|
69
67
|
private readonly Dictionary<MessageHandler, int> _globalSinks = new();
|
|
70
|
-
private readonly Dictionary<Type,
|
|
71
|
-
new();
|
|
68
|
+
private readonly Dictionary<Type, SortedList<int, List<object>>> _interceptsByType = new();
|
|
72
69
|
private readonly Dictionary<object, Dictionary<int, int>> _uniqueInterceptorsAndPriorities =
|
|
73
70
|
new();
|
|
74
71
|
|
|
@@ -309,11 +306,11 @@
|
|
|
309
306
|
if (
|
|
310
307
|
!_interceptsByType.TryGetValue(
|
|
311
308
|
type,
|
|
312
|
-
out
|
|
309
|
+
out SortedList<int, List<object>> prioritizedInterceptors
|
|
313
310
|
)
|
|
314
311
|
)
|
|
315
312
|
{
|
|
316
|
-
prioritizedInterceptors = new
|
|
313
|
+
prioritizedInterceptors = new SortedList<int, List<object>>();
|
|
317
314
|
_interceptsByType[type] = prioritizedInterceptors;
|
|
318
315
|
}
|
|
319
316
|
|
|
@@ -461,7 +458,7 @@
|
|
|
461
458
|
if (
|
|
462
459
|
_postProcessingSinks.TryGetValue(
|
|
463
460
|
type,
|
|
464
|
-
out
|
|
461
|
+
out SortedList<int, Dictionary<MessageHandler, int>> sortedHandlers
|
|
465
462
|
)
|
|
466
463
|
&& 0 < sortedHandlers.Count
|
|
467
464
|
)
|
|
@@ -597,12 +594,12 @@
|
|
|
597
594
|
type,
|
|
598
595
|
out Dictionary<
|
|
599
596
|
InstanceId,
|
|
600
|
-
|
|
597
|
+
SortedList<int, Dictionary<MessageHandler, int>>
|
|
601
598
|
> targetedHandlers
|
|
602
599
|
)
|
|
603
600
|
&& targetedHandlers.TryGetValue(
|
|
604
601
|
target,
|
|
605
|
-
out
|
|
602
|
+
out SortedList<int, Dictionary<MessageHandler, int>> sortedHandlers
|
|
606
603
|
)
|
|
607
604
|
&& 0 < sortedHandlers.Count
|
|
608
605
|
)
|
|
@@ -929,12 +926,12 @@
|
|
|
929
926
|
type,
|
|
930
927
|
out Dictionary<
|
|
931
928
|
InstanceId,
|
|
932
|
-
|
|
929
|
+
SortedList<int, Dictionary<MessageHandler, int>>
|
|
933
930
|
> broadcastHandlers
|
|
934
931
|
)
|
|
935
932
|
&& broadcastHandlers.TryGetValue(
|
|
936
933
|
source,
|
|
937
|
-
out
|
|
934
|
+
out SortedList<int, Dictionary<MessageHandler, int>> sortedHandlers
|
|
938
935
|
)
|
|
939
936
|
&& 0 < sortedHandlers.Count
|
|
940
937
|
)
|
|
@@ -1336,10 +1333,7 @@
|
|
|
1336
1333
|
)
|
|
1337
1334
|
{
|
|
1338
1335
|
if (
|
|
1339
|
-
!_interceptsByType.TryGetValue(
|
|
1340
|
-
type,
|
|
1341
|
-
out SortedDictionary<int, List<object>> interceptors
|
|
1342
|
-
)
|
|
1336
|
+
!_interceptsByType.TryGetValue(type, out SortedList<int, List<object>> interceptors)
|
|
1343
1337
|
|| interceptors.Count <= 0
|
|
1344
1338
|
)
|
|
1345
1339
|
{
|
|
@@ -1504,7 +1498,7 @@
|
|
|
1504
1498
|
if (
|
|
1505
1499
|
!_sinks.TryGetValue(
|
|
1506
1500
|
type,
|
|
1507
|
-
out
|
|
1501
|
+
out SortedList<int, Dictionary<MessageHandler, int>> sortedHandlers
|
|
1508
1502
|
)
|
|
1509
1503
|
|| sortedHandlers.Count <= 0
|
|
1510
1504
|
)
|
|
@@ -1587,7 +1581,7 @@
|
|
|
1587
1581
|
if (
|
|
1588
1582
|
!_sinks.TryGetValue(
|
|
1589
1583
|
type,
|
|
1590
|
-
out
|
|
1584
|
+
out SortedList<int, Dictionary<MessageHandler, int>> sortedHandlers
|
|
1591
1585
|
)
|
|
1592
1586
|
|| sortedHandlers.Count <= 0
|
|
1593
1587
|
)
|
|
@@ -1676,7 +1670,7 @@
|
|
|
1676
1670
|
if (
|
|
1677
1671
|
!_sinks.TryGetValue(
|
|
1678
1672
|
type,
|
|
1679
|
-
out
|
|
1673
|
+
out SortedList<int, Dictionary<MessageHandler, int>> sortedHandlers
|
|
1680
1674
|
)
|
|
1681
1675
|
|| sortedHandlers.Count <= 0
|
|
1682
1676
|
)
|
|
@@ -1762,7 +1756,7 @@
|
|
|
1762
1756
|
|
|
1763
1757
|
private Action InternalRegisterUntargeted<T>(
|
|
1764
1758
|
MessageHandler messageHandler,
|
|
1765
|
-
Dictionary<Type,
|
|
1759
|
+
Dictionary<Type, SortedList<int, Dictionary<MessageHandler, int>>> sinks,
|
|
1766
1760
|
RegistrationMethod registrationMethod,
|
|
1767
1761
|
int priority
|
|
1768
1762
|
)
|
|
@@ -1779,11 +1773,11 @@
|
|
|
1779
1773
|
if (
|
|
1780
1774
|
!sinks.TryGetValue(
|
|
1781
1775
|
type,
|
|
1782
|
-
out
|
|
1776
|
+
out SortedList<int, Dictionary<MessageHandler, int>> handlers
|
|
1783
1777
|
)
|
|
1784
1778
|
)
|
|
1785
1779
|
{
|
|
1786
|
-
handlers = new
|
|
1780
|
+
handlers = new SortedList<int, Dictionary<MessageHandler, int>>();
|
|
1787
1781
|
sinks[type] = handlers;
|
|
1788
1782
|
}
|
|
1789
1783
|
|
|
@@ -1866,7 +1860,7 @@
|
|
|
1866
1860
|
MessageHandler messageHandler,
|
|
1867
1861
|
Dictionary<
|
|
1868
1862
|
Type,
|
|
1869
|
-
Dictionary<InstanceId,
|
|
1863
|
+
Dictionary<InstanceId, SortedList<int, Dictionary<MessageHandler, int>>>
|
|
1870
1864
|
> sinks,
|
|
1871
1865
|
RegistrationMethod registrationMethod,
|
|
1872
1866
|
int priority
|
|
@@ -1883,27 +1877,24 @@
|
|
|
1883
1877
|
type,
|
|
1884
1878
|
out Dictionary<
|
|
1885
1879
|
InstanceId,
|
|
1886
|
-
|
|
1880
|
+
SortedList<int, Dictionary<MessageHandler, int>>
|
|
1887
1881
|
> broadcastHandlers
|
|
1888
1882
|
)
|
|
1889
1883
|
)
|
|
1890
1884
|
{
|
|
1891
1885
|
broadcastHandlers =
|
|
1892
|
-
new Dictionary<
|
|
1893
|
-
InstanceId,
|
|
1894
|
-
SortedDictionary<int, Dictionary<MessageHandler, int>>
|
|
1895
|
-
>();
|
|
1886
|
+
new Dictionary<InstanceId, SortedList<int, Dictionary<MessageHandler, int>>>();
|
|
1896
1887
|
sinks[type] = broadcastHandlers;
|
|
1897
1888
|
}
|
|
1898
1889
|
|
|
1899
1890
|
if (
|
|
1900
1891
|
!broadcastHandlers.TryGetValue(
|
|
1901
1892
|
context,
|
|
1902
|
-
out
|
|
1893
|
+
out SortedList<int, Dictionary<MessageHandler, int>> handlers
|
|
1903
1894
|
)
|
|
1904
1895
|
)
|
|
1905
1896
|
{
|
|
1906
|
-
handlers = new
|
|
1897
|
+
handlers = new SortedList<int, Dictionary<MessageHandler, int>>();
|
|
1907
1898
|
broadcastHandlers[context] = handlers;
|
|
1908
1899
|
}
|
|
1909
1900
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
3
|
+
# Visual Studio Version 17
|
|
4
|
+
VisualStudioVersion = 17.5.002.0
|
|
5
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
|
6
|
+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SourceGenerators", "SourceGenerators", "{0DF18527-7C86-4348-9EF4-33DA032D4FE7}"
|
|
7
|
+
EndProject
|
|
8
|
+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WallstopStudios.DxMessaging.SourceGenerators", "SourceGenerators\WallstopStudios.DxMessaging.SourceGenerators\WallstopStudios.DxMessaging.SourceGenerators.csproj", "{B8386663-CEF8-4AEA-93A1-FD8333348281}"
|
|
9
|
+
EndProject
|
|
10
|
+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{E3C47390-2263-42CC-AD86-419017D1EBAC}"
|
|
11
|
+
EndProject
|
|
12
|
+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WallstopStudios.DxMessaging.Tests.Runtime", "Tests\Runtime\WallstopStudios.DxMessaging.Tests.Runtime.csproj", "{95BAFE87-3361-4950-B1D8-B35D3A09AB16}"
|
|
13
|
+
EndProject
|
|
14
|
+
Global
|
|
15
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
16
|
+
Debug|Any CPU = Debug|Any CPU
|
|
17
|
+
Release|Any CPU = Release|Any CPU
|
|
18
|
+
EndGlobalSection
|
|
19
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
20
|
+
{B8386663-CEF8-4AEA-93A1-FD8333348281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
21
|
+
{B8386663-CEF8-4AEA-93A1-FD8333348281}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
22
|
+
{B8386663-CEF8-4AEA-93A1-FD8333348281}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
23
|
+
{B8386663-CEF8-4AEA-93A1-FD8333348281}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
24
|
+
{95BAFE87-3361-4950-B1D8-B35D3A09AB16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
25
|
+
{95BAFE87-3361-4950-B1D8-B35D3A09AB16}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
26
|
+
{95BAFE87-3361-4950-B1D8-B35D3A09AB16}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
27
|
+
{95BAFE87-3361-4950-B1D8-B35D3A09AB16}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
28
|
+
EndGlobalSection
|
|
29
|
+
GlobalSection(SolutionProperties) = preSolution
|
|
30
|
+
HideSolutionNode = FALSE
|
|
31
|
+
EndGlobalSection
|
|
32
|
+
GlobalSection(NestedProjects) = preSolution
|
|
33
|
+
{B8386663-CEF8-4AEA-93A1-FD8333348281} = {0DF18527-7C86-4348-9EF4-33DA032D4FE7}
|
|
34
|
+
{95BAFE87-3361-4950-B1D8-B35D3A09AB16} = {E3C47390-2263-42CC-AD86-419017D1EBAC}
|
|
35
|
+
EndGlobalSection
|
|
36
|
+
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
37
|
+
SolutionGuid = {0A0DAA20-4D59-49D7-9619-F90CBC7A1395}
|
|
38
|
+
EndGlobalSection
|
|
39
|
+
EndGlobal
|