diff --git a/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor b/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor deleted file mode 100644 index 3056cd68211..00000000000 --- a/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor +++ /dev/null @@ -1,13 +0,0 @@ -
-

@Title

- - - - - - - - -
-
- diff --git a/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs b/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs deleted file mode 100644 index 2cf6f641b7c..00000000000 --- a/src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs +++ /dev/null @@ -1,39 +0,0 @@ -// 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 - -namespace BootstrapBlazor.Server.Components.Components; - -/// -/// -/// -public sealed partial class MethodTable -{ - [Inject] - [NotNull] - private IStringLocalizer? Localizer { get; set; } - - /// - /// - /// - [Parameter] - [NotNull] - public string? Title { get; set; } - - /// - /// - /// - [Parameter] public IEnumerable? Items { get; set; } - - /// - /// OnInitialized 方法 - /// - protected override void OnInitialized() - { - base.OnInitialized(); - - Title ??= Localizer[nameof(Title)]; - - } -} diff --git a/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor b/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor index cd66c9b90c5..b4fc15fc848 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor @@ -1,4 +1,4 @@ -@page "/ajax" +@page "/ajax"

@Localizer["AjaxTitle"]

@@ -30,5 +30,3 @@ var result = await AjaxService.InvokeAsync(option); - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs index 683a41bb19c..253762c5405 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs @@ -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 @@ -63,21 +63,4 @@ class User private Task Goto() => AjaxService.Goto("/introduction"); private Task GotoSelf() => AjaxService.Goto("/ajax"); - private List GetMethods() => - [ - new() - { - Name = "InvokeAsync", - Description = Localizer["InvokeAsync"], - Parameters = "AjaxOption", - ReturnValue = "string" - }, - new() - { - Name = "Goto", - Description = Localizer["GoTo"], - Parameters = "string", - ReturnValue = " — " - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor b/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor index 083a585e76a..074219c64d6 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor @@ -1,4 +1,4 @@ -@page "/browser-finger" +@page "/browser-finger" @inject IStringLocalizer Localizer @@ -10,6 +10,7 @@ private async Task GetFingerCodeAsync() { await BrowserFingerService.GetFingerCodeAsync(); } + @@ -20,5 +21,3 @@ private async Task GetFingerCodeAsync() - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor.cs index e0a75a8f3a0..d895de4dfb3 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor.cs @@ -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 @@ -32,22 +32,4 @@ protected override async Task OnInitializedAsync() private Task GetFingerCodeAsync() => BrowserFingerService.GetFingerCodeAsync(); private Task GetClientHubIdAsync() => BrowserFingerService.GetClientHubIdAsync(); - - private MethodItem[] GetMethods() => - [ - new() - { - Name = "GetFingerCodeAsync", - Description = Localizer["GetFingerCodeAsync"], - Parameters = " — ", - ReturnValue = "Task" - }, - new() - { - Name = "GetClientHubIdAsync", - Description = Localizer["GetClientHubIdAsync"], - Parameters = " — ", - ReturnValue = "Task" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor b/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor index 5e7b96357d0..390d27fa2dd 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor @@ -157,7 +157,3 @@ - - - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs index c58df306975..3f147a14512 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Buttons.razor.cs @@ -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 @@ -15,10 +15,6 @@ public sealed partial class Buttons [NotNull] private ConsoleLogger? NormalLogger { get; set; } - /// - /// - /// - /// private void ButtonClick(MouseEventArgs e) { NormalLogger.Log($"Button Clicked"); @@ -52,35 +48,4 @@ private Task ClickButtonShowText(string text) } private static Task ClickAsyncButton() => Task.Delay(5000); - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnClick", - Description = Localizer["EventDesc1"], - Type ="EventCallback" - }, - new() - { - Name = "OnClickWithoutRender", - Description = Localizer["EventDesc2"], - Type ="Func" - } - ]; - - private MethodItem[] GetMethods() => - [ - new() - { - Name = "SetDisable", - Description = Localizer["MethodDesc1"], - Parameters = "disable", - ReturnValue = " — " - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor b/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor index b39473c76cc..ec8e2fc1034 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor @@ -18,7 +18,3 @@ - - - - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs index 02b77313fb0..56b49da71a6 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Captchas.razor.cs @@ -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 @@ -18,10 +18,6 @@ public sealed partial class Captchas private static Random ImageRandomer { get; set; } = new Random(); - /// - /// GetImageName - /// - /// private string GetImageName() { var index = Convert.ToInt32(ImageRandomer.Next(0, 8) / 1.0); @@ -31,14 +27,8 @@ private string GetImageName() return Path.Combine(ImagesPath, fileName); } - /// - /// 获得/设置 图床路径 默认值为 Pic.jpg 通过设置 Max 取 Pic0.jpg ... Pic8.jpg - /// private string ImagesName { get; set; } = "Pic.jpg"; - /// - /// 获得/设置 图床路径 默认值为 images - /// [NotNull] private string? ImagesPath { get; set; } @@ -68,33 +58,4 @@ private async Task OnValidAsync(bool ret) await NormalCaptcha.Reset(); } } - - /// - /// 获得事件方法 - /// - /// - private EventItem[] GetEvents() => - [ - new() - { - Name = "OnValid", - Description = Localizer["OnValid"], - Type ="Action" - } - ]; - - /// - /// 获得事件方法 - /// - /// - private MethodItem[] GetMethods() => - [ - new() - { - Name = "GetImageName", - Description = Localizer["GetImageName"], - Parameters =" — ", - ReturnValue = "string" - } - ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor b/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor index db8a4d1a410..42e577a04e5 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor @@ -10,5 +10,3 @@

@((MarkupString)Localizer["ChartIntro2"].Value)

- - diff --git a/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor.cs index 3cca87fab2c..5522b4fb2fd 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Charts/Index.razor.cs @@ -10,46 +10,5 @@ namespace BootstrapBlazor.Server.Components.Samples.Charts; /// public sealed partial class Index { - /// - /// 获得方法列表 - /// - /// - private static IEnumerable GetMethodAttributes() => new MethodItem[] - { - new MethodItem() - { - Name = nameof(BootstrapBlazor.Components.Chart.OnInitAsync), - Description = "组件数据初始化委托方法", - Parameters = "Func>", - ReturnValue = " — " - }, - new MethodItem() - { - Name = nameof(BootstrapBlazor.Components.Chart.OnAfterInitAsync), - Description = "客户端绘制图表完毕后回调此委托方法", - Parameters = "Func", - ReturnValue = " — " - }, - new MethodItem() - { - Name = nameof(BootstrapBlazor.Components.Chart.OnAfterUpdateAsync), - Description = "客户端更新图表完毕后回调此委托方法", - Parameters = "Func", - 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 = " — " - } - }; + } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor b/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor index 33ff4e45f44..fee51455cdd 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor @@ -1,4 +1,4 @@ -@page "/clipboard-service" +@page "/clipboard-service" @inject IStringLocalizer Localizer @@ -20,11 +20,10 @@ private async Task GetText() { var text = await ClipboardService.GetText(); } +