Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/BootstrapBlazor.Server/Components/Components/MethodTable.razor

This file was deleted.

This file was deleted.

4 changes: 1 addition & 3 deletions src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/ajax"
@page "/ajax"

<h3>@Localizer["AjaxTitle"]</h3>

Expand Down Expand Up @@ -30,5 +30,3 @@ var result = await AjaxService.InvokeAsync(option);</Pre>
<Button OnClick="Goto">@Localizer["GoToButtonText1"]</Button>
<Button OnClick="GotoSelf">@Localizer["GoToButtonText2"]</Button>
</DemoBlock>

<MethodTable Items="@GetMethods()" />
19 changes: 1 addition & 18 deletions src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
Expand Down Expand Up @@ -63,21 +63,4 @@ class User
private Task Goto() => AjaxService.Goto("/introduction");

private Task GotoSelf() => AjaxService.Goto("/ajax");
private List<MethodItem> GetMethods() =>
[
new()
{
Name = "InvokeAsync",
Description = Localizer["InvokeAsync"],
Parameters = "AjaxOption",
ReturnValue = "string"
},
new()
{
Name = "Goto",
Description = Localizer["GoTo"],
Parameters = "string",
ReturnValue = " — "
}
];
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/browser-finger"
@page "/browser-finger"
@inject IStringLocalizer<BrowserFingers> Localizer

<DemoBlock Title="@Localizer["BrowserFingerTitle"]" Introduction="@Localizer["BrowserFingerIntro"]" ShowCode="false" Name="BrowserFinger">
Expand All @@ -10,6 +10,7 @@ private async Task GetFingerCodeAsync()
{
await BrowserFingerService.GetFingerCodeAsync();
}</Pre>

<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="Browser-Finger"></BootstrapInputGroupLabel>
<BootstrapInput Value="@_code" Readonly="true" />
Expand All @@ -20,5 +21,3 @@ private async Task GetFingerCodeAsync()
<BootstrapInput Value="@_clientHubId" Readonly="true" />
</BootstrapInputGroup>
</DemoBlock>

<MethodTable Items="GetMethods()" />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
Expand Down Expand Up @@ -32,22 +32,4 @@ protected override async Task OnInitializedAsync()
private Task<string?> GetFingerCodeAsync() => BrowserFingerService.GetFingerCodeAsync();

private Task<string?> GetClientHubIdAsync() => BrowserFingerService.GetClientHubIdAsync();

private MethodItem[] GetMethods() =>
[
new()
{
Name = "GetFingerCodeAsync",
Description = Localizer["GetFingerCodeAsync"],
Parameters = " — ",
ReturnValue = "Task<string?>"
},
new()
{
Name = "GetClientHubIdAsync",
Description = Localizer["GetClientHubIdAsync"],
Parameters = " — ",
ReturnValue = "Task<string?>"
}
];
}
4 changes: 0 additions & 4 deletions src/BootstrapBlazor.Server/Components/Samples/Buttons.razor
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,3 @@
</DemoBlock>

<AttributeTable Type="typeof(Button)" />
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes both EventTable and MethodTable references from this file. However, the PR title and linked issue #7579 only mention removing the MethodTable component. The removal of EventTable and the GetEvents method appears to be outside the scope of this PR. Consider either updating the PR description to reflect the additional changes or creating a separate PR for EventTable removals.

Copilot uses AI. Check for mistakes.

<EventTable Items="@GetEvents()" />

<MethodTable Items="@GetMethods()" />
37 changes: 1 addition & 36 deletions src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
Expand All @@ -15,10 +15,6 @@ public sealed partial class Buttons
[NotNull]
private ConsoleLogger? NormalLogger { get; set; }

/// <summary>
///
/// </summary>
/// <param name="e"></param>
private void ButtonClick(MouseEventArgs e)
{
NormalLogger.Log($"Button Clicked");
Expand Down Expand Up @@ -52,35 +48,4 @@ private Task ClickButtonShowText(string text)
}

private static Task ClickAsyncButton() => Task.Delay(5000);

/// <summary>
/// 获得事件方法
/// </summary>
/// <returns></returns>
private EventItem[] GetEvents() =>
[
new()
{
Name = "OnClick",
Description = Localizer["EventDesc1"],
Type ="EventCallback<MouseEventArgs>"
},
new()
{
Name = "OnClickWithoutRender",
Description = Localizer["EventDesc2"],
Type ="Func<Task>"
}
];

private MethodItem[] GetMethods() =>
[
new()
{
Name = "SetDisable",
Description = Localizer["MethodDesc1"],
Parameters = "disable",
ReturnValue = " — "
}
];
}
4 changes: 0 additions & 4 deletions src/BootstrapBlazor.Server/Components/Samples/Captchas.razor
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@
</DemoBlock>

<AttributeTable Type="typeof(Captcha)" />
Copy link

Copilot AI Jan 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes both EventTable and MethodTable references from this file. However, the PR title and linked issue #7579 only mention removing the MethodTable component. The removal of EventTable and the GetEvents method appears to be outside the scope of this PR. Consider either updating the PR description to reflect the additional changes or creating a separate PR for EventTable removals.

Copilot uses AI. Check for mistakes.

<EventTable Items="@GetEvents()" />

<MethodTable Items="@GetMethods()" />
41 changes: 1 addition & 40 deletions src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
Expand All @@ -18,10 +18,6 @@ public sealed partial class Captchas

private static Random ImageRandomer { get; set; } = new Random();

/// <summary>
/// GetImageName
/// </summary>
/// <returns></returns>
private string GetImageName()
{
var index = Convert.ToInt32(ImageRandomer.Next(0, 8) / 1.0);
Expand All @@ -31,14 +27,8 @@ private string GetImageName()
return Path.Combine(ImagesPath, fileName);
}

/// <summary>
/// 获得/设置 图床路径 默认值为 Pic.jpg 通过设置 Max 取 Pic0.jpg ... Pic8.jpg
/// </summary>
private string ImagesName { get; set; } = "Pic.jpg";

/// <summary>
/// 获得/设置 图床路径 默认值为 images
/// </summary>
[NotNull]
private string? ImagesPath { get; set; }

Expand Down Expand Up @@ -68,33 +58,4 @@ private async Task OnValidAsync(bool ret)
await NormalCaptcha.Reset();
}
}

/// <summary>
/// 获得事件方法
/// </summary>
/// <returns></returns>
private EventItem[] GetEvents() =>
[
new()
{
Name = "OnValid",
Description = Localizer["OnValid"],
Type ="Action<bool>"
}
];

/// <summary>
/// 获得事件方法
/// </summary>
/// <returns></returns>
private MethodItem[] GetMethods() =>
[
new()
{
Name = "GetImageName",
Description = Localizer["GetImageName"],
Parameters =" — ",
ReturnValue = "string"
}
];
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@
<p class="mt-2">@((MarkupString)Localizer["ChartIntro2"].Value)</p>

<AttributeTable Type="typeof(Chart)" />

<MethodTable Items="@GetMethodAttributes()" />
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,5 @@ namespace BootstrapBlazor.Server.Components.Samples.Charts;
/// </summary>
public sealed partial class Index
{
/// <summary>
/// 获得方法列表
/// </summary>
/// <returns></returns>
private static IEnumerable<MethodItem> GetMethodAttributes() => new MethodItem[]
{
new MethodItem()
{
Name = nameof(BootstrapBlazor.Components.Chart.OnInitAsync),
Description = "组件数据初始化委托方法",
Parameters = "Func<Task<ChartDataSource>>",
ReturnValue = " — "
},
new MethodItem()
{
Name = nameof(BootstrapBlazor.Components.Chart.OnAfterInitAsync),
Description = "客户端绘制图表完毕后回调此委托方法",
Parameters = "Func<Task>",
ReturnValue = " — "
},
new MethodItem()
{
Name = nameof(BootstrapBlazor.Components.Chart.OnAfterUpdateAsync),
Description = "客户端更新图表完毕后回调此委托方法",
Parameters = "Func<ChartAction, Task>",
ReturnValue = " — "
},
new MethodItem()
{
Name = nameof(BootstrapBlazor.Components.Chart.Update),
Description = "更新图表方法",
Parameters ="Task",
ReturnValue = " — "
},
new MethodItem()
{
Name = nameof(BootstrapBlazor.Components.Chart.Reload),
Description = "重新加载,强制重新渲染图表",
Parameters = "Task",
ReturnValue = " — "
}
};

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/clipboard-service"
@page "/clipboard-service"
@inject IStringLocalizer<Clipboards> Localizer

<DemoBlock Title="@Localizer["ClipboardTitle"]" Introduction="@Localizer["ClipboardIntro"]" ShowCode="false" Name="Clipboard">
Expand All @@ -20,11 +20,10 @@ private async Task GetText()
{
var text = await ClipboardService.GetText();
}</Pre>

<BootstrapInputGroup>
<BootstrapInput @bind-Value="@content" />
<Button Text="Copy" OnClick="@Copy" />
<Button Color="Color.Warning" Text="Get" OnClick="@Get" />
</BootstrapInputGroup>
</DemoBlock>

<MethodTable Items="GetMethods()" />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
Expand Down Expand Up @@ -39,29 +39,4 @@ private async Task Get()
}
}
}

private MethodItem[] GetMethods() =>
[
new()
{
Name = "Copy",
Description = Localizer["ClipboardCopyMethod"],
Parameters = " — ",
ReturnValue = "Task"
},
new()
{
Name = "Get",
Description = Localizer["ClipboardGetMethod"],
Parameters = " — ",
ReturnValue = "Task<List<ClipboardItem>?>"
},
new()
{
Name = "GetText",
Description = Localizer["ClipboardGetTextMethod"],
Parameters = " — ",
ReturnValue = "Task<string?>"
}
];
}
2 changes: 0 additions & 2 deletions src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,3 @@
</DemoBlock>

<AttributeTable Type="typeof(Dropzone<>)" />

<MethodTable Items="GetMethods()" />
Loading
Loading