2 implementations of ICascadingValueSupplier
Microsoft.AspNetCore.Components (2)
CascadingValue.cs (1)
11public class CascadingValue<TValue> : ICascadingValueSupplier, IComponent
CascadingValueSource.cs (1)
14public class CascadingValueSource<TValue> : ICascadingValueSupplier
31 references to ICascadingValueSupplier
Microsoft.AspNetCore.Components (30)
CascadingParameterState.cs (7)
20public ICascadingValueSupplier ValueSupplier { get; } 22public CascadingParameterState(in CascadingParameterInfo parameterInfo, ICascadingValueSupplier valueSupplier) 53var supplier = GetMatchingCascadingValueSupplier(info, componentState.Renderer, componentState.LogicalParentComponentState); 68throw new InvalidOperationException($"'{info.Attribute.GetType()}' is flagged with SingleDelivery, but the selected supplier '{supplier.GetType()}' is not flagged with {nameof(ICascadingValueSupplier.IsFixed)}"); 77internal static ICascadingValueSupplier? GetMatchingCascadingValueSupplier(in CascadingParameterInfo info, Renderer renderer, ComponentState? componentState) 83if (candidate.Component is ICascadingValueSupplier valueSupplier && valueSupplier.CanSupplyValue(info)) 92foreach (var valueSupplier in renderer.ServiceProviderCascadingValueSuppliers)
CascadingValue.cs (4)
129bool ICascadingValueSupplier.CanSupplyValue(in CascadingParameterInfo parameterInfo) 143object? ICascadingValueSupplier.GetCurrentValue(in CascadingParameterInfo parameterInfo) 148void ICascadingValueSupplier.Subscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo) 161void ICascadingValueSupplier.Unsubscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo)
CascadingValueServiceCollectionExtensions.cs (6)
24=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(() => initialValueFactory(sp), isFixed: true)); 37=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(name, () => initialValueFactory(sp), isFixed: true)); 53=> serviceCollection.AddScoped<ICascadingValueSupplier>(sourceFactory); 68ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>( 86ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>( 107ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>(sourceFactory));
CascadingValueSource.cs (5)
137bool ICascadingValueSupplier.IsFixed => _isFixed; 139bool ICascadingValueSupplier.CanSupplyValue(in CascadingParameterInfo parameterInfo) 152object? ICascadingValueSupplier.GetCurrentValue(in CascadingParameterInfo parameterInfo) 163void ICascadingValueSupplier.Subscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo) 172void ICascadingValueSupplier.Unsubscribe(ComponentState subscriber, in CascadingParameterInfo parameterInfo)
Rendering\ComponentState.cs (2)
253var valueSupplier = _cascadingParameters[i].ValueSupplier; 269var supplier = _cascadingParameters[i].ValueSupplier;
RenderTree\Renderer.cs (4)
93ServiceProviderCascadingValueSuppliers = serviceProvider.GetService<ICascadingValueSupplier>() is null 94? Array.Empty<ICascadingValueSupplier>() 95: serviceProvider.GetServices<ICascadingValueSupplier>().ToArray(); 98internal ICascadingValueSupplier[] ServiceProviderCascadingValueSuppliers { get; }
Routing\SupplyParameterFromQueryValueProvider.cs (1)
10internal sealed class SupplyParameterFromQueryValueProvider(NavigationManager navigationManager) : ICascadingValueSupplier, IDisposable
SupplyParameterFromQueryProviderServiceCollectionExtensions.cs (1)
22services.TryAddEnumerable(ServiceDescriptor.Scoped<ICascadingValueSupplier, SupplyParameterFromQueryValueProvider>());
Microsoft.AspNetCore.Components.Web (1)
HtmlRendering\StaticHtmlRenderer.HtmlWriting.cs (1)
250var supplier = CascadingParameterState.GetMatchingCascadingValueSupplier(