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