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)
25=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(() => initialValueFactory(sp), isFixed: true)); 38=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(name, () => initialValueFactory(sp), isFixed: true)); 88sp => new CascadingValueSource<TValue>(() => valueFactory(sp), isFixed: true))); 106sp => 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)
44/// With this overload, you can supply a <see cref="CascadingValueSource{TValue}"/> which allows you 50/// <param name="sourceFactory">A callback that supplies a <see cref="CascadingValueSource{TValue}"/> within each service provider scope.</param> 53this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory) 87ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>( 105ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>( 114/// With this overload, you can supply a <see cref="CascadingValueSource{TValue}"/> which allows you 120/// <param name="sourceFactory">A callback that supplies a <see cref="CascadingValueSource{TValue}"/> within each service provider scope.</param> 123this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory) 126ServiceDescriptor.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);