Skip to content

Commit 2f2cd71

Browse files
committed
mass update xml documentation
1 parent 0d2f2f0 commit 2f2cd71

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2750
-274
lines changed

samples/Sample.Core/Pages/Loading/Index.razor

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@
1818

1919
<h3>Block Mode - No Content</h3>
2020

21-
<LoadingBlock IsLoading="IsLoading"
22-
LoadingText="Loading ..." />
21+
<LoadingBlock IsLoading="IsLoading" />
2322

2423
<h3>Block Mode - With Content</h3>
2524

26-
<LoadingBlock IsLoading="IsLoading"
27-
LoadingText="Loading ...">
25+
<LoadingBlock IsLoading="IsLoading">
2826
<EditForm Model="Register">
2927
<DataAnnotationsValidator />
3028
<ValidationSummary />
@@ -79,15 +77,13 @@
7977
</EditForm>
8078

8179
<LoadingBlock IsLoading="IsLoading"
82-
LoadingText="Loading ..."
8380
ShowOverlay="true" />
8481
</div>
8582

8683

8784
<h3>Overlay Mode - With Content</h3>
8885

8986
<LoadingBlock IsLoading="IsLoading"
90-
LoadingText="Loading ..."
9187
ShowOverlay="true">
9288
<EditForm Model="Register">
9389
<DataAnnotationsValidator />

src/LoreSoft.Blazor.Controls/Buttons/BusyButton.cs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,67 @@
66

77
namespace LoreSoft.Blazor.Controls;
88

9+
/// <summary>
10+
/// A button component that displays a busy indicator and disables itself while an operation is in progress.
11+
/// </summary>
912
public class BusyButton : ComponentBase
1013
{
14+
/// <summary>
15+
/// Indicates whether the button is busy. When <c>true</c>, the busy indicator is shown and the button is disabled.
16+
/// </summary>
1117
[Parameter]
1218
public bool Busy { get; set; }
1319

20+
/// <summary>
21+
/// Indicates whether the button is disabled. When <c>true</c>, the button cannot be clicked.
22+
/// </summary>
1423
[Parameter]
1524
public bool Disabled { get; set; }
1625

26+
/// <summary>
27+
/// The text to display when the button is busy. This text is shown in the busy template if no custom template is provided. Defaults to "Processing".
28+
/// </summary>
1729
[Parameter]
1830
public string BusyText { get; set; } = "Processing";
1931

32+
/// <summary>
33+
/// Custom template to display when the button is busy. If not set, a default template is used.
34+
/// </summary>
2035
[Parameter]
2136
public RenderFragment? BusyTemplate { get; set; }
2237

38+
/// <summary>
39+
/// The content to display inside the button when it is not busy.
40+
/// </summary>
2341
[Parameter]
2442
public RenderFragment? ChildContent { get; set; }
2543

44+
/// <summary>
45+
/// Additional attributes to be applied to the button element.
46+
/// </summary>
2647
[Parameter(CaptureUnmatchedValues = true)]
2748
public Dictionary<string, object> AdditionalAttributes { get; set; } = [];
2849

50+
/// <summary>
51+
/// The event callback to trigger when the button is clicked. Automatically sets the button to busy while executing.
52+
/// </summary>
2953
[Parameter]
3054
public EventCallback Trigger { get; set; }
3155

56+
/// <summary>
57+
/// Indicates whether the button is currently executing the trigger callback.
58+
/// </summary>
3259
private bool Executing { get; set; }
3360

61+
/// <summary>
62+
/// The CSS class name for the button element. Computed based on AdditionalAttributes and default class.
63+
/// </summary>
3464
protected string? ClassName { get; set; }
3565

66+
/// <summary>
67+
/// Builds the render tree for the BusyButton component.
68+
/// </summary>
69+
/// <param name="builder">The <see cref="RenderTreeBuilder"/> used to build the component's render tree.</param>
3670
protected override void BuildRenderTree(RenderTreeBuilder builder)
3771
{
3872
builder.OpenElement(0, "button");
@@ -58,6 +92,9 @@ protected override void BuildRenderTree(RenderTreeBuilder builder)
5892
builder.CloseElement(); // button
5993
}
6094

95+
/// <summary>
96+
/// Sets parameters and updates the CSS class name and default busy template.
97+
/// </summary>
6198
protected override void OnParametersSet()
6299
{
63100
base.OnParametersSet();
@@ -89,8 +126,14 @@ protected override void OnParametersSet()
89126
};
90127
}
91128

129+
/// <summary>
130+
/// Gets a value indicating whether the button is busy, either by the <see cref="Busy"/> parameter or while executing the trigger.
131+
/// </summary>
92132
protected bool IsBusy => Busy || Executing;
93133

134+
/// <summary>
135+
/// Executes the <see cref="Trigger"/> callback and manages the busy state.
136+
/// </summary>
94137
private async Task ExecuteTrigger()
95138
{
96139
if (!Trigger.HasDelegate)

src/LoreSoft.Blazor.Controls/Conditional/Conditional.cs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,61 @@
33

44
namespace LoreSoft.Blazor.Controls;
55

6+
/// <summary>
7+
/// Renders content conditionally based on a boolean value.
8+
/// </summary>
69
public class Conditional : ComponentBase
710
{
11+
/// <summary>
12+
/// The condition to evaluate. If <c>true</c>, <see cref="Passed"/> or <see cref="ChildContent"/> is rendered; otherwise, <see cref="Failed"/> is rendered.
13+
/// </summary>
814
[Parameter]
915
public bool Condition { get; set; }
1016

17+
/// <summary>
18+
/// The default content to render when <see cref="Condition"/> is <c>true</c> and <see cref="Passed"/> is not set.
19+
/// </summary>
1120
[Parameter]
1221
public RenderFragment? ChildContent { get; set; }
1322

23+
/// <summary>
24+
/// The content to render when <see cref="Condition"/> is <c>true</c>. If set, <see cref="ChildContent"/> is ignored.
25+
/// </summary>
1426
[Parameter]
1527
public RenderFragment? Passed { get; set; }
1628

29+
/// <summary>
30+
/// The content to render when <see cref="Condition"/> is <c>false</c>.
31+
/// </summary>
1732
[Parameter]
1833
public RenderFragment? Failed { get; set; }
1934

20-
/// <inheritdoc />
35+
/// <summary>
36+
/// Builds the render tree for the <see cref="Conditional"/> component.
37+
/// </summary>
38+
/// <param name="builder">The <see cref="RenderTreeBuilder"/> used to build the component's render tree.</param>
2139
protected override void BuildRenderTree(RenderTreeBuilder builder)
2240
{
2341
if (Condition)
2442
{
2543
if (Passed != null)
2644
{
27-
builder.AddContent(1, Passed);
45+
builder.AddContent(0, Passed);
2846
}
2947
else if (ChildContent != null)
3048
{
31-
builder.AddContent(2, ChildContent);
49+
builder.AddContent(1, ChildContent);
3250
}
3351
}
3452
else if (Failed != null)
3553
{
36-
builder.AddContent(3, Failed);
54+
builder.AddContent(2, Failed);
3755
}
3856
}
3957

40-
/// <inheritdoc />
58+
/// <summary>
59+
/// Called when component parameters are set. Throws if both <see cref="Passed"/> and <see cref="ChildContent"/> are specified.
60+
/// </summary>
4161
protected override void OnParametersSet()
4262
{
4363
base.OnParametersSet();

0 commit comments

Comments
 (0)