32 references to SectionContent
Microsoft.AspNetCore.Components (22)
Sections\SectionContent.cs (6)
56throw new InvalidOperationException($"{nameof(SectionContent)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values."); 68throw new InvalidOperationException($"{nameof(SectionContent)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'."); 94case nameof(SectionContent.SectionName): 97case nameof(SectionContent.SectionId): 100case nameof(SectionContent.IsDefaultContent): 103case 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; 22/// Gets or sets the <see cref="string"/> ID that determines which <see cref="SectionContent"/> instances will provide 28/// Gets or sets the <see cref="object"/> ID that determines which <see cref="SectionContent"/> instances will provide 81internal void ContentUpdated(SectionContent? provider)
Sections\SectionRegistry.cs (11)
11private readonly Dictionary<object, List<SectionContent>> _providersByIdentifier = new(); 17public void AddProvider(object identifier, SectionContent provider, bool isDefaultProvider) 35public void RemoveProvider(object identifier, SectionContent provider) 55var contentProvider = GetCurrentProviderContentOrDefault(providers); 73var provider = GetCurrentProviderContentOrDefault(identifier); 93public void NotifyContentProviderChanged(object identifier, SectionContent provider) 113private void DetectRenderModeMismatch(object identifier, SectionOutlet subscriber, SectionContent? provider) 159private static SectionContent? GetCurrentProviderContentOrDefault(List<SectionContent> providers) 164private SectionContent? GetCurrentProviderContentOrDefault(object identifier) 169private 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)
47builder.OpenComponent<SectionContent>(2); 48builder.AddComponentParameter(3, nameof(SectionContent.SectionId), TitleSectionId); 49builder.AddComponentParameter(4, nameof(SectionContent.IsDefaultContent), true); 50builder.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);