com.wallstop-studios.dxmessaging 2.0.0-rc11 → 2.0.0-rc13

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.
Files changed (107) hide show
  1. package/.gitattributes +63 -63
  2. package/.github/workflows/npm-publish.yml +66 -0
  3. package/CHANGELOG.md.meta +7 -7
  4. package/Editor/Analyzers/Microsoft.CodeAnalysis.CSharp.dll.meta +33 -33
  5. package/Editor/Analyzers/Microsoft.CodeAnalysis.dll.meta +33 -33
  6. package/Editor/Analyzers/System.Reflection.Metadata.dll.meta +33 -33
  7. package/Editor/Analyzers/WallstopStudios.DxMessaging.SourceGenerators.dll.meta +71 -71
  8. package/Editor/Analyzers.meta +8 -8
  9. package/Editor/SetupCscRsp.cs +162 -146
  10. package/Editor/SetupCscRsp.cs.meta +2 -2
  11. package/Editor/WallstopStudios.DxMessaging.Editor.asmdef +17 -17
  12. package/Editor/WallstopStudios.DxMessaging.Editor.asmdef.meta +7 -7
  13. package/Editor.meta +8 -8
  14. package/LICENSE.md +6 -6
  15. package/LICENSE.md.meta +7 -7
  16. package/README.md +387 -363
  17. package/README.md.meta +7 -7
  18. package/Runtime/Core/Attributes/DxAutoMessageTypeAttribute.cs +7 -9
  19. package/Runtime/Core/Attributes/DxAutoMessageTypeAttribute.cs.meta +2 -2
  20. package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs +7 -10
  21. package/Runtime/Core/Attributes/DxBroadcastMessageAttribute.cs.meta +2 -2
  22. package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs +7 -10
  23. package/Runtime/Core/Attributes/DxTargetedMessageAttribute.cs.meta +2 -2
  24. package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs +7 -10
  25. package/Runtime/Core/Attributes/DxUntargetedMessageAttribute.cs.meta +2 -2
  26. package/Runtime/Core/Attributes.meta +2 -2
  27. package/Runtime/Core/Extensions/MessageExtensions.cs +342 -275
  28. package/Runtime/Core/Extensions/MessageExtensions.cs.meta +11 -11
  29. package/Runtime/Core/Extensions.meta +8 -8
  30. package/Runtime/Core/IMessage.cs +12 -12
  31. package/Runtime/Core/IMessage.cs.meta +11 -11
  32. package/Runtime/Core/InstanceId.cs +149 -149
  33. package/Runtime/Core/InstanceId.cs.meta +11 -11
  34. package/Runtime/Core/MessageBus/IMessageBus.cs +309 -309
  35. package/Runtime/Core/MessageBus/IMessageBus.cs.meta +11 -11
  36. package/Runtime/Core/MessageBus/MessageBus.cs +2243 -2084
  37. package/Runtime/Core/MessageBus/MessageBus.cs.meta +11 -11
  38. package/Runtime/Core/MessageBus/MessagingRegistration.cs +105 -100
  39. package/Runtime/Core/MessageBus/MessagingRegistration.cs.meta +11 -11
  40. package/Runtime/Core/MessageBus/RegistrationLog.cs +111 -111
  41. package/Runtime/Core/MessageBus/RegistrationLog.cs.meta +11 -11
  42. package/Runtime/Core/MessageBus.meta +8 -8
  43. package/Runtime/Core/MessageHandler.cs +2778 -2759
  44. package/Runtime/Core/MessageHandler.cs.meta +11 -11
  45. package/Runtime/Core/MessageRegistrationHandle.cs +110 -110
  46. package/Runtime/Core/MessageRegistrationHandle.cs.meta +11 -11
  47. package/Runtime/Core/MessageRegistrationToken.cs +1234 -1234
  48. package/Runtime/Core/MessageRegistrationToken.cs.meta +11 -11
  49. package/Runtime/Core/Messages/IBroadcastMessage.cs +27 -27
  50. package/Runtime/Core/Messages/IBroadcastMessage.cs.meta +11 -11
  51. package/Runtime/Core/Messages/ITargetedMessage.cs +27 -26
  52. package/Runtime/Core/Messages/ITargetedMessage.cs.meta +11 -11
  53. package/Runtime/Core/Messages/IUntargetedMessage.cs +27 -26
  54. package/Runtime/Core/Messages/IUntargetedMessage.cs.meta +11 -11
  55. package/Runtime/Core/Messages.meta +8 -8
  56. package/Runtime/Core/MessagingDebug.cs +70 -71
  57. package/Runtime/Core/MessagingDebug.cs.meta +11 -11
  58. package/Runtime/Core.meta +8 -8
  59. package/Runtime/Unity/MessageAwareComponent.cs +77 -77
  60. package/Runtime/Unity/MessageAwareComponent.cs.meta +11 -11
  61. package/Runtime/Unity/MessagingComponent.cs +99 -99
  62. package/Runtime/Unity/MessagingComponent.cs.meta +11 -11
  63. package/Runtime/Unity.meta +8 -8
  64. package/Runtime/WallstopStudios.DxMessaging.asmdef +15 -15
  65. package/Runtime.meta +8 -8
  66. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoMessageTypeGenerator.cs +92 -75
  67. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxAutoMessageTypeGenerator.cs.meta +11 -11
  68. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxBroadcastMessageGenerator.cs +94 -77
  69. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxBroadcastMessageGenerator.cs.meta +2 -2
  70. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxTargetedMessageGenerator.cs +94 -77
  71. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxTargetedMessageGenerator.cs.meta +2 -2
  72. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxUntargetedMessageGenerator.cs +94 -78
  73. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/DxUntargetedMessageGenerator.cs.meta +2 -2
  74. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj +21 -21
  75. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.csproj.meta +7 -7
  76. package/SourceGenerators/WallstopStudios.DxMessaging.SourceGenerators.meta +8 -8
  77. package/SourceGenerators.meta +8 -8
  78. package/Tests/Runtime/Benchmarks/PerformanceTests.cs +373 -310
  79. package/Tests/Runtime/Benchmarks/PerformanceTests.cs.meta +11 -11
  80. package/Tests/Runtime/Benchmarks.meta +8 -8
  81. package/Tests/Runtime/Core/BroadcastTests.cs +899 -899
  82. package/Tests/Runtime/Core/GlobalAcceptAllTests.cs +190 -169
  83. package/Tests/Runtime/Core/GlobalAcceptAllTests.cs.meta +11 -11
  84. package/Tests/Runtime/Core/MessagingTestBase.cs +185 -164
  85. package/Tests/Runtime/Core/MessagingTestBase.cs.meta +11 -11
  86. package/Tests/Runtime/Core/NominalTests.cs +1740 -1518
  87. package/Tests/Runtime/Core/PostProcessorTests.cs +1236 -849
  88. package/Tests/Runtime/Core/PostProcessorTests.cs.meta +11 -11
  89. package/Tests/Runtime/Core/RegistrationTests.cs +1266 -995
  90. package/Tests/Runtime/Core/RegistrationTests.cs.meta +11 -11
  91. package/Tests/Runtime/Core/TargetedTests.cs +888 -888
  92. package/Tests/Runtime/Core/TargetedTests.cs.meta +11 -11
  93. package/Tests/Runtime/Core/UntargetedTests.cs +272 -272
  94. package/Tests/Runtime/Core/UntargetedTests.cs.meta +11 -11
  95. package/Tests/Runtime/Scripts/Components/EmptyMessageAwareComponent.cs +9 -9
  96. package/Tests/Runtime/Scripts/Components/EmptyMessageAwareComponent.cs.meta +11 -11
  97. package/Tests/Runtime/Scripts/Components/SimpleMessageAwareComponent.cs +186 -140
  98. package/Tests/Runtime/Scripts/Messages/ComplexTargetedMessage.cs +30 -30
  99. package/Tests/Runtime/Scripts/Messages/SimpleBroadcastMessage.cs +8 -8
  100. package/Tests/Runtime/Scripts/Messages/SimpleTargetedMessage.cs +8 -8
  101. package/Tests/Runtime/Scripts/Messages/SimpleUntargetedMessage.cs +8 -8
  102. package/Tests/Runtime/WallstopStudios.DxMessaging.Tests.Runtime.asmdef +22 -22
  103. package/Tests/Runtime/WallstopStudios.DxMessaging.Tests.Runtime.csproj.meta +7 -7
  104. package/Tests.meta +8 -8
  105. package/Third Party Notices.md.meta +7 -7
  106. package/package.json +36 -36
  107. package/package.json.meta +7 -7
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: a5f6f9d30e8df104dbd3a1bda50cce5f
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: a5f6f9d30e8df104dbd3a1bda50cce5f
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,100 +1,105 @@
1
- namespace DxMessaging.Core.MessageBus
2
- {
3
- using System;
4
- using System.Runtime.Serialization;
5
-
6
- /// <summary>
7
- /// How the registration was performed.
8
- /// </summary>
9
- public enum RegistrationType
10
- {
11
- Register,
12
- Deregister
13
- }
14
-
15
- /// <summary>
16
- /// Exact method of MessagingRegistration.
17
- /// </summary>
18
- public enum RegistrationMethod
19
- {
20
- Targeted,
21
- Untargeted,
22
- Broadcast,
23
- BroadcastWithoutSource,
24
- TargetedWithoutTargeting,
25
- GlobalAcceptAll,
26
- Interceptor,
27
- UntargetedPostProcessor,
28
- TargetedPostProcessor,
29
- BroadcastPostProcessor,
30
- TargetedWithoutTargetingPostProcessor,
31
- BroadcastWithoutSourcePostProcessor,
32
- }
33
-
34
- /// <summary>
35
- /// Holds relevant information about a MessagingRegistration event
36
- /// </summary>
37
- [Serializable]
38
- [DataContract]
39
- public readonly struct MessagingRegistration
40
- {
41
- /// <summary>
42
- /// Id of the MessageHandler that was registered.
43
- /// </summary>
44
- public readonly InstanceId id;
45
-
46
- /// <summary>
47
- /// Name of the type of Message that was registered for.
48
- /// </summary>
49
- public readonly Type type;
50
-
51
- /// <summary>
52
- /// New registration? De-registration?
53
- /// </summary>
54
- public readonly RegistrationType registrationType;
55
-
56
- /// <summary>
57
- /// Exact method of the registration.
58
- /// </summary>
59
- public readonly RegistrationMethod registrationMethod;
60
-
61
- #if UNITY_2017_1_OR_NEWER
62
- /// <summary>
63
- /// Unity time of the registration
64
- /// </summary>
65
- public readonly float time;
66
- #endif
67
-
68
- /// <summary>
69
- /// Creates a MessagingRegistration with all of the relevant tidbits filled out.
70
- /// </summary>
71
- /// <param name="id">Id of the MessageHandler.</param>
72
- /// <param name="type">Type of Message.</param>
73
- /// <param name="registrationType">Register? Deregister?</param>
74
- /// <param name="registrationMethod">How the Message was chosen to be listened for.</param>
75
- public MessagingRegistration(InstanceId id, Type type, RegistrationType registrationType, RegistrationMethod registrationMethod)
76
- {
77
- this.id = id;
78
- this.type = type;
79
- this.registrationType = registrationType;
80
- this.registrationMethod = registrationMethod;
81
- #if UNITY_2017_1_OR_NEWER
82
- time = UnityEngine.Time.time;
83
- #endif
84
- }
85
-
86
- public override string ToString()
87
- {
88
- return new
89
- {
90
- #if UNITY_2017_1_OR_NEWER
91
- time,
92
- #endif
93
- id,
94
- type,
95
- registrationType,
96
- registrationMethod
97
- }.ToString();
98
- }
99
- }
100
- }
1
+ namespace DxMessaging.Core.MessageBus
2
+ {
3
+ using System;
4
+ using System.Runtime.Serialization;
5
+
6
+ /// <summary>
7
+ /// How the registration was performed.
8
+ /// </summary>
9
+ public enum RegistrationType
10
+ {
11
+ Register,
12
+ Deregister,
13
+ }
14
+
15
+ /// <summary>
16
+ /// Exact method of MessagingRegistration.
17
+ /// </summary>
18
+ public enum RegistrationMethod
19
+ {
20
+ Targeted,
21
+ Untargeted,
22
+ Broadcast,
23
+ BroadcastWithoutSource,
24
+ TargetedWithoutTargeting,
25
+ GlobalAcceptAll,
26
+ Interceptor,
27
+ UntargetedPostProcessor,
28
+ TargetedPostProcessor,
29
+ BroadcastPostProcessor,
30
+ TargetedWithoutTargetingPostProcessor,
31
+ BroadcastWithoutSourcePostProcessor,
32
+ }
33
+
34
+ /// <summary>
35
+ /// Holds relevant information about a MessagingRegistration event
36
+ /// </summary>
37
+ [Serializable]
38
+ [DataContract]
39
+ public readonly struct MessagingRegistration
40
+ {
41
+ /// <summary>
42
+ /// Id of the MessageHandler that was registered.
43
+ /// </summary>
44
+ public readonly InstanceId id;
45
+
46
+ /// <summary>
47
+ /// Name of the type of Message that was registered for.
48
+ /// </summary>
49
+ public readonly Type type;
50
+
51
+ /// <summary>
52
+ /// New registration? De-registration?
53
+ /// </summary>
54
+ public readonly RegistrationType registrationType;
55
+
56
+ /// <summary>
57
+ /// Exact method of the registration.
58
+ /// </summary>
59
+ public readonly RegistrationMethod registrationMethod;
60
+
61
+ #if UNITY_2017_1_OR_NEWER
62
+ /// <summary>
63
+ /// Unity time of the registration
64
+ /// </summary>
65
+ public readonly float time;
66
+ #endif
67
+
68
+ /// <summary>
69
+ /// Creates a MessagingRegistration with all of the relevant tidbits filled out.
70
+ /// </summary>
71
+ /// <param name="id">Id of the MessageHandler.</param>
72
+ /// <param name="type">Type of Message.</param>
73
+ /// <param name="registrationType">Register? Deregister?</param>
74
+ /// <param name="registrationMethod">How the Message was chosen to be listened for.</param>
75
+ public MessagingRegistration(
76
+ InstanceId id,
77
+ Type type,
78
+ RegistrationType registrationType,
79
+ RegistrationMethod registrationMethod
80
+ )
81
+ {
82
+ this.id = id;
83
+ this.type = type;
84
+ this.registrationType = registrationType;
85
+ this.registrationMethod = registrationMethod;
86
+ #if UNITY_2017_1_OR_NEWER
87
+ time = UnityEngine.Time.time;
88
+ #endif
89
+ }
90
+
91
+ public override string ToString()
92
+ {
93
+ return new
94
+ {
95
+ #if UNITY_2017_1_OR_NEWER
96
+ time,
97
+ #endif
98
+ id,
99
+ type,
100
+ registrationType,
101
+ registrationMethod,
102
+ }.ToString();
103
+ }
104
+ }
105
+ }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: eee96e56f24970f4eb8be60dadefbefc
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: eee96e56f24970f4eb8be60dadefbefc
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,111 +1,111 @@
1
- namespace DxMessaging.Core.MessageBus
2
- {
3
- using System;
4
- using System.Collections.Generic;
5
- using System.Text;
6
-
7
- /// <summary>
8
- /// Logs all MessageHandler registrations from the beginning of time.
9
- /// </summary>
10
- public sealed class RegistrationLog
11
- {
12
- public IReadOnlyList<MessagingRegistration> Registrations => _finalizedRegistrations;
13
-
14
- private readonly List<MessagingRegistration> _finalizedRegistrations;
15
-
16
- public bool Enabled
17
- {
18
- get => _enabled;
19
- set => _enabled = value;
20
- }
21
-
22
- private bool _enabled;
23
-
24
- public RegistrationLog(bool enabled = false)
25
- {
26
- _enabled = enabled;
27
- _finalizedRegistrations = new List<MessagingRegistration>();
28
- }
29
-
30
- /// <summary>
31
- /// Logs a MessagingRegistration.
32
- /// </summary>
33
- /// <param name="registration">MessagingRegistration to record.</param>
34
- public void Log(MessagingRegistration registration)
35
- {
36
- if (!_enabled)
37
- {
38
- return;
39
- }
40
- _finalizedRegistrations.Add(registration);
41
- }
42
-
43
- /// <summary>
44
- /// Retrieves all registrations for the provided InstanceId.
45
- /// </summary>
46
- /// <param name="instanceId">InstanceId to search for.</param>
47
- /// <returns>All registrations for the provided InstanceId.</returns>
48
- public IEnumerable<MessagingRegistration> GetRegistrations(InstanceId instanceId)
49
- {
50
- foreach (MessagingRegistration registration in _finalizedRegistrations)
51
- {
52
- if (registration.id == instanceId)
53
- {
54
- yield return registration;
55
- }
56
- }
57
- }
58
-
59
- /// <summary>
60
- /// Pretty-print all of the logged Messaging registrations using the provided print function.
61
- /// </summary>
62
- /// <param name="serializer">Serialization function to use. If null, defaults to MessagingRegistration.ToString.</param>
63
- /// <returns>The string representing all logged MessagingRegistrations.</returns>
64
- public string ToString(Func<MessagingRegistration, string> serializer)
65
- {
66
- if (_finalizedRegistrations.Count == 0)
67
- {
68
- return "[]";
69
- }
70
-
71
- serializer ??= registration => registration.ToString();
72
-
73
- StringBuilder registrations = new();
74
- _ = registrations.Append('[');
75
- for (int i = 0; i < _finalizedRegistrations.Count; ++i)
76
- {
77
- if (0 < i)
78
- {
79
- _ = registrations.Append(", ");
80
- }
81
- MessagingRegistration finalizedRegistration = _finalizedRegistrations[i];
82
- string prettyFinalizedRegistration = serializer(finalizedRegistration);
83
- _ = registrations.Append(prettyFinalizedRegistration);
84
- }
85
- _ = registrations.Append(']');
86
- return registrations.ToString();
87
- }
88
-
89
- public override string ToString()
90
- {
91
- return ToString(null);
92
- }
93
-
94
- /// <summary>
95
- /// Removes all MessagingRegistrations that satisfy the provided function, or all registrations if no function is provided.
96
- /// </summary>
97
- /// <param name="shouldRemove">Null if all MessagingRegistrations should be removed, or a custom function that returns true for any MessagingRegistration that should be removed.</param>
98
- /// <returns>Number of MessagingRegistrations removed.</returns>
99
- public int Clear(Predicate<MessagingRegistration> shouldRemove = null)
100
- {
101
- if (shouldRemove == null)
102
- {
103
- int currentCount = _finalizedRegistrations.Count;
104
- _finalizedRegistrations.Clear();
105
- return currentCount;
106
- }
107
-
108
- return _finalizedRegistrations.RemoveAll(shouldRemove);
109
- }
110
- }
111
- }
1
+ namespace DxMessaging.Core.MessageBus
2
+ {
3
+ using System;
4
+ using System.Collections.Generic;
5
+ using System.Text;
6
+
7
+ /// <summary>
8
+ /// Logs all MessageHandler registrations from the beginning of time.
9
+ /// </summary>
10
+ public sealed class RegistrationLog
11
+ {
12
+ public IReadOnlyList<MessagingRegistration> Registrations => _finalizedRegistrations;
13
+
14
+ private readonly List<MessagingRegistration> _finalizedRegistrations;
15
+
16
+ public bool Enabled
17
+ {
18
+ get => _enabled;
19
+ set => _enabled = value;
20
+ }
21
+
22
+ private bool _enabled;
23
+
24
+ public RegistrationLog(bool enabled = false)
25
+ {
26
+ _enabled = enabled;
27
+ _finalizedRegistrations = new List<MessagingRegistration>();
28
+ }
29
+
30
+ /// <summary>
31
+ /// Logs a MessagingRegistration.
32
+ /// </summary>
33
+ /// <param name="registration">MessagingRegistration to record.</param>
34
+ public void Log(MessagingRegistration registration)
35
+ {
36
+ if (!_enabled)
37
+ {
38
+ return;
39
+ }
40
+ _finalizedRegistrations.Add(registration);
41
+ }
42
+
43
+ /// <summary>
44
+ /// Retrieves all registrations for the provided InstanceId.
45
+ /// </summary>
46
+ /// <param name="instanceId">InstanceId to search for.</param>
47
+ /// <returns>All registrations for the provided InstanceId.</returns>
48
+ public IEnumerable<MessagingRegistration> GetRegistrations(InstanceId instanceId)
49
+ {
50
+ foreach (MessagingRegistration registration in _finalizedRegistrations)
51
+ {
52
+ if (registration.id == instanceId)
53
+ {
54
+ yield return registration;
55
+ }
56
+ }
57
+ }
58
+
59
+ /// <summary>
60
+ /// Pretty-print all of the logged Messaging registrations using the provided print function.
61
+ /// </summary>
62
+ /// <param name="serializer">Serialization function to use. If null, defaults to MessagingRegistration.ToString.</param>
63
+ /// <returns>The string representing all logged MessagingRegistrations.</returns>
64
+ public string ToString(Func<MessagingRegistration, string> serializer)
65
+ {
66
+ if (_finalizedRegistrations.Count == 0)
67
+ {
68
+ return "[]";
69
+ }
70
+
71
+ serializer ??= registration => registration.ToString();
72
+
73
+ StringBuilder registrations = new();
74
+ _ = registrations.Append('[');
75
+ for (int i = 0; i < _finalizedRegistrations.Count; ++i)
76
+ {
77
+ if (0 < i)
78
+ {
79
+ _ = registrations.Append(", ");
80
+ }
81
+ MessagingRegistration finalizedRegistration = _finalizedRegistrations[i];
82
+ string prettyFinalizedRegistration = serializer(finalizedRegistration);
83
+ _ = registrations.Append(prettyFinalizedRegistration);
84
+ }
85
+ _ = registrations.Append(']');
86
+ return registrations.ToString();
87
+ }
88
+
89
+ public override string ToString()
90
+ {
91
+ return ToString(null);
92
+ }
93
+
94
+ /// <summary>
95
+ /// Removes all MessagingRegistrations that satisfy the provided function, or all registrations if no function is provided.
96
+ /// </summary>
97
+ /// <param name="shouldRemove">Null if all MessagingRegistrations should be removed, or a custom function that returns true for any MessagingRegistration that should be removed.</param>
98
+ /// <returns>Number of MessagingRegistrations removed.</returns>
99
+ public int Clear(Predicate<MessagingRegistration> shouldRemove = null)
100
+ {
101
+ if (shouldRemove == null)
102
+ {
103
+ int currentCount = _finalizedRegistrations.Count;
104
+ _finalizedRegistrations.Clear();
105
+ return currentCount;
106
+ }
107
+
108
+ return _finalizedRegistrations.RemoveAll(shouldRemove);
109
+ }
110
+ }
111
+ }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 40f286d82f8049a4cb8c8634b4d869f6
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 40f286d82f8049a4cb8c8634b4d869f6
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,8 +1,8 @@
1
- fileFormatVersion: 2
2
- guid: 83a6c4df135c37d4ebaf87dfd072ebd3
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 83a6c4df135c37d4ebaf87dfd072ebd3
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant: