Add named cascading parameters
06104fde
Pascal Schwab
committed
succeeded
3 changed files
CascadingComponentBase.cs
/WPE.App.Base/CascadingComponentBase.cs-2+4
/WPE.App.Base/CascadingComponentBase.cs
Add comment 50 _hasNeverRendered = false;
Add comment 51 builder.OpenComponent<CascadingValue<Guid>>(1);
Add comment 52 builder.AddAttribute(2, "Value", LocalizationDefinition);
Add comment 53 Minus   builder.AddAttribute(3, "ChildContent", (RenderFragment)(builder =>
Add comment 53 Plus   builder.AddAttribute(3, "Name", "LocalizationDefinition");
Add comment 54 Plus   builder.AddAttribute(4, "ChildContent", (RenderFragment)(builder =>
Add comment 54 55 {
Add comment 55 56 builder.OpenComponent<CascadingValue<AppComponentState>>(1);
Add comment 56 57 builder.AddAttribute(2, "Value", AppComponentState);
Add comment 57 Minus   builder.AddAttribute(3, "ChildContent", (RenderFragment)BuildRenderTree);
Add comment 58 Plus   builder.AddAttribute(3, "Name", "AppComponentState");
Add comment 59 Plus   builder.AddAttribute(4, "ChildContent", (RenderFragment)BuildRenderTree);
Add comment 58 60 builder.CloseComponent();
Add comment 59 61 }));
Add comment 60 62 builder.CloseComponent();
SubComponent.cs
/WPE.App.Base/SubComponent.cs-1+7
/WPE.App.Base/SubComponent.cs
Add comment 18 /// <summary>
Add comment 19 /// Definition to use, when requesting a localization
Add comment 20 /// </summary>
Add comment 21 Minus   [CascadingParameter]
Add comment 21 Plus   [CascadingParameter(Name = "LocalizationDefinition")]
Add comment 22 public required Guid LocalizationDefinition { get; set; }
Add comment 23
Add comment 24 /// <summary>
Add comment 25 Plus   /// State provides feedback on the reception of the requested data
Add comment 26 Plus   /// </summary>
Add comment 27 Plus   [CascadingParameter(Name = "AppComponentState")]
Add comment 28 Plus   public required AppComponentState AppComponentState { get; set; }
Add comment 29 Plus  
Add comment 30 Plus   /// <summary>
Add comment 25 31 /// Set scope name
Add comment 26 32 /// </summary>
Add comment 27 33 #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
WPE.App.Base.csproj
/WPE.App.Base/WPE.App.Base.csproj-1+1
/WPE.App.Base/WPE.App.Base.csproj
Add comment 15 <PackageIcon>icon.png</PackageIcon>
Add comment 16 <PackageReadmeFile>ReadMe.md</PackageReadmeFile>
Add comment 17 <PackageTags>WPE;Workplace Experience;Blazor;MAUI;infsoft</PackageTags>
Add comment 18 Minus   <Version>1.1.3</Version>
Add comment 18 Plus   <Version>1.1.4</Version>
Add comment 19 <GenerateDocumentationFile>true</GenerateDocumentationFile>
Add comment 20 </PropertyGroup>
Add comment 21