File tree Expand file tree Collapse file tree
ReactiveUI.Binding.SourceGenerators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ namespace ReactiveUI.Binding.SourceGenerators;
1515
1616/// <summary>
1717/// The main incremental source generator entry point for ReactiveUI property observation and binding.
18- /// Orchestrates two pipelines:
18+ /// Orchestrates three pipelines:
1919/// Pipeline A (Type Detection): Detects notification mechanisms and generates high-affinity fallback binders.
2020/// Pipeline B (Invocation Detection): Detects WhenChanged/WhenChanging/Bind calls and generates per-invocation code.
21+ /// Pipeline C (View Dispatch): Scans IViewFor<T> implementations and generates AOT-safe view locator dispatch.
2122/// </summary>
2223[ Generator ]
2324public class BindingGenerator : IIncrementalGenerator
Original file line number Diff line number Diff line change @@ -13,21 +13,21 @@ namespace ReactiveUI.Binding;
1313/// </summary>
1414public sealed class DefaultViewLocator : IViewLocator
1515{
16- /// <summary>
17- /// Synchronization lock for thread-safe access to mappings.
18- /// </summary>
19- #if NET9_0_OR_GREATER
20- private static readonly Lock _lock = new ( ) ;
21- #else
22- private static readonly object _lock = new ( ) ;
23- #endif
24-
2516 /// <summary>
2617 /// Source-generated dispatch function set by the generated code.
2718 /// Signature: (viewModelInstance, contract) returns IViewFor or null.
2819 /// </summary>
2920 private static Func < object , string , IViewFor ? > ? _generatedDispatch ;
3021
22+ /// <summary>
23+ /// Synchronization lock for thread-safe access to this instance's mappings.
24+ /// </summary>
25+ #if NET9_0_OR_GREATER
26+ private readonly Lock _lock = new ( ) ;
27+ #else
28+ private readonly object _lock = new ( ) ;
29+ #endif
30+
3131 /// <summary>
3232 /// Runtime explicit mappings from (viewModelType, contract) to view factory.
3333 /// Uses copy-on-write semantics for thread safety.
You can’t perform that action at this time.
0 commit comments