34 references to SectionContent
Microsoft.AspNetCore.Components (21)
Sections\SectionContent.cs (6)
53throw new InvalidOperationException($"{nameof(SectionContent)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values."); 65throw new InvalidOperationException($"{nameof(SectionContent)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'."); 91case nameof(SectionContent.SectionName): 94case nameof(SectionContent.SectionId): 97case nameof(SectionContent.IsDefaultContent): 100case nameof(SectionContent.ChildContent):
Sections\SectionOutlet.cs (5)
9/// Renders content provided by <see cref="SectionContent"/> components with matching <see cref="SectionId"/>s. 17private SectionContent? _currentContentProvider; 20/// Gets or sets the <see cref="string"/> ID that determines which <see cref="SectionContent"/> instances will provide 26/// Gets or sets the <see cref="object"/> ID that determines which <see cref="SectionContent"/> instances will provide 78internal void ContentUpdated(SectionContent? provider)
Sections\SectionRegistry.cs (10)
9private readonly Dictionary<object, List<SectionContent>> _providersByIdentifier = new(); 11public void AddProvider(object identifier, SectionContent provider, bool isDefaultProvider) 29public void RemoveProvider(object identifier, SectionContent provider) 49var contentProvider = GetCurrentProviderContentOrDefault(providers); 62var provider = GetCurrentProviderContentOrDefault(identifier); 76public void NotifyContentProviderChanged(object identifier, SectionContent provider) 91private static SectionContent? GetCurrentProviderContentOrDefault(List<SectionContent> providers) 96private SectionContent? GetCurrentProviderContentOrDefault(object identifier) 101private void NotifyContentChangedForSubscriber(object identifier, SectionContent? provider)
Microsoft.AspNetCore.Components.Web (10)
Head\HeadContent.cs (3)
23builder.OpenComponent<SectionContent>(0); 24builder.AddComponentParameter(1, nameof(SectionContent.SectionId), HeadOutlet.HeadSectionId); 25builder.AddComponentParameter(2, nameof(SectionContent.ChildContent), ChildContent);
Head\HeadOutlet.cs (4)
46builder.OpenComponent<SectionContent>(2); 47builder.AddComponentParameter(3, nameof(SectionContent.SectionId), TitleSectionId); 48builder.AddComponentParameter(4, nameof(SectionContent.IsDefaultContent), true); 49builder.AddComponentParameter(5, nameof(SectionContent.ChildContent), (RenderFragment)BuildDefaultTitleRenderTree);
Head\PageTitle.cs (3)
23builder.OpenComponent<SectionContent>(0); 24builder.AddComponentParameter(1, nameof(SectionContent.SectionId), HeadOutlet.TitleSectionId); 25builder.AddComponentParameter(2, nameof(SectionContent.ChildContent), (RenderFragment)BuildTitleRenderTree);
Microsoft.AspNetCore.Components.Web.Tests (3)
HtmlRendering\HtmlRendererTest.cs (3)
819var second = await htmlRenderer.RenderComponentAsync<SectionContent>(ParameterView.FromDictionary(new Dictionary<string, object> 821{ nameof(SectionContent.SectionId), "testsection" }, 822{ nameof(SectionContent.ChildContent), (RenderFragment)(builder =>