32 references to SectionContent
Microsoft.AspNetCore.Components (22)
Sections\SectionContent.cs (6)
56
throw new InvalidOperationException($"{nameof(
SectionContent
)} requires that '{nameof(SectionName)}' and '{nameof(SectionId)}' cannot both have non-null values.");
68
throw new InvalidOperationException($"{nameof(
SectionContent
)} requires a non-null value either for '{nameof(SectionName)}' or '{nameof(SectionId)}'.");
94
case nameof(
SectionContent
.SectionName):
97
case nameof(
SectionContent
.SectionId):
100
case nameof(
SectionContent
.IsDefaultContent):
103
case nameof(
SectionContent
.ChildContent):
Sections\SectionOutlet.cs (5)
9
/// Renders content provided by <see cref="
SectionContent
"/> components with matching <see cref="SectionId"/>s.
17
private
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
81
internal void ContentUpdated(
SectionContent
? provider)
Sections\SectionRegistry.cs (11)
11
private readonly Dictionary<object, List<
SectionContent
>> _providersByIdentifier = new();
17
public void AddProvider(object identifier,
SectionContent
provider, bool isDefaultProvider)
35
public void RemoveProvider(object identifier,
SectionContent
provider)
55
var
contentProvider = GetCurrentProviderContentOrDefault(providers);
73
var
provider = GetCurrentProviderContentOrDefault(identifier);
93
public void NotifyContentProviderChanged(object identifier,
SectionContent
provider)
113
private void DetectRenderModeMismatch(object identifier, SectionOutlet subscriber,
SectionContent
? provider)
159
private static
SectionContent
? GetCurrentProviderContentOrDefault(List<
SectionContent
> providers)
164
private
SectionContent
? GetCurrentProviderContentOrDefault(object identifier)
169
private void NotifyContentChangedForSubscriber(object identifier,
SectionContent
? provider)
Microsoft.AspNetCore.Components.Web (10)
Head\HeadContent.cs (3)
23
builder.OpenComponent<
SectionContent
>(0);
24
builder.AddComponentParameter(1, nameof(
SectionContent
.SectionId), HeadOutlet.HeadSectionId);
25
builder.AddComponentParameter(2, nameof(
SectionContent
.ChildContent), ChildContent);
Head\HeadOutlet.cs (4)
47
builder.OpenComponent<
SectionContent
>(2);
48
builder.AddComponentParameter(3, nameof(
SectionContent
.SectionId), TitleSectionId);
49
builder.AddComponentParameter(4, nameof(
SectionContent
.IsDefaultContent), true);
50
builder.AddComponentParameter(5, nameof(
SectionContent
.ChildContent), (RenderFragment)BuildDefaultTitleRenderTree);
Head\PageTitle.cs (3)
23
builder.OpenComponent<
SectionContent
>(0);
24
builder.AddComponentParameter(1, nameof(
SectionContent
.SectionId), HeadOutlet.TitleSectionId);
25
builder.AddComponentParameter(2, nameof(
SectionContent
.ChildContent), (RenderFragment)BuildTitleRenderTree);