1 type derived from CascadingValueSource
Microsoft.AspNetCore.Components.Authorization (1)
CascadingAuthenticationStateServiceCollectionExtensions.cs (1)
29private sealed class AuthenticationStateCascadingValueSource : CascadingValueSource<Task<AuthenticationState>>, IDisposable
12 instantiations of CascadingValueSource
Microsoft.AspNetCore.Components (4)
CascadingValueServiceCollectionExtensions.cs (4)
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)); 69sp => new CascadingValueSource<TValue>(() => valueFactory(sp), isFixed: true))); 87sp => new CascadingValueSource<TValue>(name, () => valueFactory(sp), isFixed: true)));
Microsoft.AspNetCore.Components.Tests (8)
CascadingParameterTest.cs (8)
560var cascadingValueSource = new CascadingValueSource<MyParamType>(new MyParamType("Initial value"), isFixed: false); 576var cascadingValueSource = new CascadingValueSource<MyParamType>(myParamValue, isFixed: false); 643var cascadingValueSource = new CascadingValueSource<MyParamType>(paramValue, isFixed: false); 697var cascadingValueSource = new CascadingValueSource<MyParamType>( 822services.TryAddCascadingValue(_ => new CascadingValueSource<Type1>("Name1", new Type1(), false)); 823services.TryAddCascadingValue(_ => new CascadingValueSource<Type1>("Name2", new Type1(), false)); 824services.TryAddCascadingValue(_ => new CascadingValueSource<Type2>("Name3", new Type2(), false)); 842var cascadingValueSource = new CascadingValueSource<MyParamType>(paramValue, isFixed: false);
22 references to CascadingValueSource
Microsoft.AspNetCore.Components (13)
CascadingValueServiceCollectionExtensions.cs (9)
43/// With this overload, you can supply a <see cref="CascadingValueSource{TValue}"/> which allows you 49/// <param name="sourceFactory">A callback that supplies a <see cref="CascadingValueSource{TValue}"/> within each service provider scope.</param> 52this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory) 68ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>( 86ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>( 95/// With this overload, you can supply a <see cref="CascadingValueSource{TValue}"/> which allows you 101/// <param name="sourceFactory">A callback that supplies a <see cref="CascadingValueSource{TValue}"/> within each service provider scope.</param> 104this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory) 107ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>(sourceFactory));
CascadingValueSource.cs (4)
28/// Constructs an instance of <see cref="CascadingValueSource{TValue}"/>. 38/// Constructs an instance of <see cref="CascadingValueSource{TValue}"/>. 50/// Constructs an instance of <see cref="CascadingValueSource{TValue}"/>. 60/// Constructs an instance of <see cref="CascadingValueSource{TValue}"/>.
Microsoft.AspNetCore.Components.Tests (9)
CascadingParameterTest.cs (9)
560var cascadingValueSource = new CascadingValueSource<MyParamType>(new MyParamType("Initial value"), isFixed: false); 576var cascadingValueSource = new CascadingValueSource<MyParamType>(myParamValue, isFixed: false); 643var cascadingValueSource = new CascadingValueSource<MyParamType>(paramValue, isFixed: false); 697var cascadingValueSource = new CascadingValueSource<MyParamType>( 833[InlineData(CascadingValueSource<MyParamType>.ComponentStateBuffer.Capacity - 1)] 834[InlineData(CascadingValueSource<MyParamType>.ComponentStateBuffer.Capacity)] 835[InlineData(CascadingValueSource<MyParamType>.ComponentStateBuffer.Capacity + 1)] 836[InlineData(CascadingValueSource<MyParamType>.ComponentStateBuffer.Capacity * 2)] 842var cascadingValueSource = new CascadingValueSource<MyParamType>(paramValue, isFixed: false);