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 @@
-
-
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();
}
+
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor.cs
index f0cf5890652..e134a12b846 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Clipboards.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Clipboards.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
@@ -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?>"
- },
- new()
- {
- Name = "GetText",
- Description = Localizer["ClipboardGetTextMethod"],
- Parameters = " — ",
- ReturnValue = "Task"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor b/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor
index d751c5917e3..6adeafb6984 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor
@@ -91,5 +91,3 @@
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs
index a98618de5bb..2bc4c34f034 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/DragDrops.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/DragDrops.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
@@ -13,37 +13,21 @@ public partial class DragDrops
[NotNull]
private ConsoleLogger? Logger { get; set; }
- ///
- /// OnItemDropRejectedByMaxItemLimit
- ///
- ///
private void OnItemDropRejectedByMaxItemLimit(string item)
{
Logger.Log($"{item}由于超过最大数量限制被禁止");
}
- ///
- /// OnItemDropRejected
- ///
- ///
private void OnItemDropRejected(string item)
{
Logger.Log($"{item}被拒绝");
}
- ///
- /// OnReplacedItemDrop
- ///
- ///
private void OnReplacedItemDrop(string item)
{
Logger.Log($"新元素放在{item}下");
}
- ///
- /// OnItemDrop
- ///
- ///
private void OnItemDrop(string item)
{
Logger.Log($"{item}被放下");
@@ -56,7 +40,7 @@ private void OnItemDrop(string item)
private List? StrList2 { get; set; }
///
- /// OnInitialized
+ ///
///
protected override void OnInitialized()
{
@@ -78,68 +62,4 @@ protected override void OnInitialized()
"10"
];
}
-
- ///
- /// GetMethods
- ///
- ///
- private MethodItem[] GetMethods() =>
- [
- new()
- {
- Name = nameof(Dropzone.Accepts),
- Description = Localizer["M1"],
- Parameters = "Func",
- ReturnValue = "bool "
- },
- new()
- {
- Name = nameof(Dropzone.AllowsDrag),
- Description = Localizer["M2"],
- Parameters = "TItem",
- ReturnValue = "bool"
- },
- new()
- {
- Name = nameof(Dropzone.CopyItem),
- Description = Localizer["M3"],
- Parameters = "TItem, TItem",
- ReturnValue = "TItem"
- },
- new()
- {
- Name = nameof(Dropzone.ItemWrapperClass),
- Description = Localizer["M4"],
- Parameters = "TItem",
- ReturnValue = "string"
- },
- new()
- {
- Name = nameof(Dropzone.OnItemDrop),
- Description = Localizer["M5"],
- Parameters = " — ",
- ReturnValue = " — "
- },
- new()
- {
- Name = nameof(Dropzone.OnItemDropRejected),
- Description = Localizer["M6"],
- Parameters = " — ",
- ReturnValue = " — "
- },
- new()
- {
- Name = nameof(Dropzone.OnReplacedItemDrop),
- Description = Localizer["M7"],
- Parameters = " — ",
- ReturnValue = " — "
- },
- new()
- {
- Name = nameof(Dropzone.OnItemDropRejectedByMaxItemLimit),
- Description = Localizer["M8"],
- Parameters = " — ",
- ReturnValue = " — "
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor b/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor
index e9af3af677a..ec119afdb97 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor
@@ -1,4 +1,4 @@
-@page "/js-extensions"
+@page "/js-extensions"
@inject IStringLocalizer Localizer
@@ -58,5 +58,3 @@ await Module.OpenUrl("url", "_self");
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.cs
index 55e8f51d501..07948a4fcda 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/JSRuntimeExtensions.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
@@ -64,38 +64,6 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
private async Task RunFunction() => functionResult = await Module.Function(functionContent);
- private MethodItem[] GetMethods() =>
- [
- new()
- {
- Name = "OpenUrl",
- Description = Localizer["OpenUrlAttr"].Value,
- Parameters = " — ",
- ReturnValue = "ValueTask"
- },
- new()
- {
- Name = "IsMobile",
- Description = Localizer["IsMobileAttr"].Value,
- Parameters = " — ",
- ReturnValue = "ValueTask"
- },
- new()
- {
- Name = "Eval",
- Description = Localizer["EvalAttr"].Value,
- Parameters = " — ",
- ReturnValue = "ValueTask"
- },
- new()
- {
- Name = "Function",
- Description = Localizer["FunctionAttr"].Value,
- Parameters = " — ",
- ReturnValue = "ValueTask"
- }
- ];
-
private async ValueTask DisposeAsync(bool disposing)
{
if (disposing && Module != null)
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor b/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor
index 8b9c71c8300..f89657746e2 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor
@@ -105,5 +105,3 @@
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.cs
index 2fb343e8f7c..455b123c054 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ListViews.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/ListViews.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
@@ -17,7 +17,7 @@ public sealed partial class ListViews
private IEnumerable? Products { get; set; }
///
- /// OnInitialized
+ ///
///
protected override void OnInitialized()
{
@@ -61,15 +61,4 @@ internal class Product
public string Category { get; set; } = "";
}
-
- private MethodItem[] GetMethods() =>
- [
- new()
- {
- Name = "QueryAsync",
- Description = Localizer["QueryAsync"],
- Parameters = " — ",
- ReturnValue = "Task"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor b/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor
index 750ef11fcbc..83176ce25b0 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor
@@ -27,5 +27,3 @@
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor.cs
index 705a7535a70..4b01c63f2b6 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Mermaids.razor.cs
@@ -154,19 +154,4 @@ section A section
};
private Task OnDownloadPDFAsync() => _mermaid.DownloadPdfAsync($"mermaid-pdf-{DateTime.Now:HHmmss}.pdf");
-
- ///
- /// Methods
- ///
- ///
- private MethodItem[] GetMethods() =>
- [
- new()
- {
- Name = "ExportBase64MermaidAsync",
- Description = Localizer["ExportBase64Mermaid"],
- Parameters = " — ",
- ReturnValue = "string"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor b/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor
index ffbdcff137a..dd39c5ddbcc 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor
@@ -523,5 +523,3 @@ private void Navigation()
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.cs
index bc416d31ad4..0f1460648d7 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Tabs.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Tabs.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
@@ -111,12 +111,6 @@ private Task OnClickMenuItem(MenuItem item)
return Task.CompletedTask;
}
- private async Task OnBeforeShowContextMenu(TabItem item)
- {
- await Task.Yield();
- return item.IsDisabled == false;
- }
-
private void AddTabItem(string text) => TabSetMenu.AddTab(new Dictionary
{
[nameof(TabItem.Text)] = text,
@@ -162,75 +156,4 @@ private Task OnSetTitle(string text)
StateHasChanged();
return Task.CompletedTask;
}
-
- ///
- /// 获得方法
- ///
- ///
- private MethodItem[] GetMethods() =>
- [
- new MethodItem()
- {
- Name = "AddTab",
- Description = Localizer["TabMethod1AddTab"].Value,
- Parameters = "TabItem, int? Index = null",
- ReturnValue = " — "
- },
- new MethodItem()
- {
- Name = "RemoveTab",
- Description = Localizer["TabMethod2RemoveTab"].Value,
- Parameters = "TabItem",
- ReturnValue = " — "
- },
- new MethodItem()
- {
- Name = "ActiveTab",
- Description = Localizer["TabMethod3ActiveTab"].Value,
- Parameters = "TabItem",
- ReturnValue = " — "
- },
- new MethodItem()
- {
- Name = "ClickPrevTab",
- Description = Localizer["TabMethod4ClickPrevTab"].Value,
- Parameters = "",
- ReturnValue = "Task"
- },
- new MethodItem()
- {
- Name = "ClickNextTab",
- Description = Localizer["TabMethod5ClickNextTab"].Value,
- Parameters = "",
- ReturnValue = "Task"
- },
- new MethodItem()
- {
- Name = "CloseCurrentTab",
- Description = Localizer["TabMethod6CloseCurrentTab"].Value,
- Parameters = "",
- ReturnValue = "Task"
- },
- new MethodItem()
- {
- Name = "CloseOtherTabs",
- Description = Localizer["TabMethod7CloseOtherTabs"].Value,
- Parameters = "",
- ReturnValue = "Task"
- },
- new MethodItem()
- {
- Name = "CloseAllTabs",
- Description = Localizer["TabMethod8CloseAllTabs"].Value,
- Parameters = "",
- ReturnValue = "Task"
- },
- new MethodItem()
- {
- Name = nameof(Tab.GetActiveTab),
- Description = Localizer["TabMethod9GetActiveTab"].Value,
- Parameters = "",
- ReturnValue = "TabItem"
- }
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Translators.razor b/src/BootstrapBlazor.Server/Components/Samples/Translators.razor
index d975d72946d..14ba558411f 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Translators.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/Translators.razor
@@ -26,5 +26,3 @@
}
}
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/Translators.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Translators.razor.cs
index 2000aecfe70..0014e603506 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/Translators.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/Translators.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
@@ -48,14 +48,4 @@ private static string FormatResult(TranslationText translation)
var culture = new CultureInfo(translation.TargetLanguage);
return $"{culture.NativeName}: {translation.Text}";
}
- protected MethodItem[] GetMethods() =>
- [
- new()
- {
- Name = nameof(IAzureTranslatorService.TranslateAsync),
- Description = Localizer[nameof(IAzureTranslatorService.TranslateAsync)],
- Parameters = " - ",
- ReturnValue = "IReadOnlyList"
- },
- ];
}
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor
index 92b558d5b13..f6ec6bf29dc 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor
+++ b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor
@@ -417,5 +417,3 @@ private Task OnClickValidate()
-
-
diff --git a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs
index 0dd977dc993..d97ec9c33f0 100644
--- a/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs
+++ b/src/BootstrapBlazor.Server/Components/Samples/ValidateForms.razor.cs
@@ -103,7 +103,7 @@ private Task OnInvalidSubmit2(EditContext context)
private Task OnValidSetError(EditContext context)
{
- FooForm.SetError(f => f.Name, Localizer["DatabaseExistLog"]);
+ FooForm?.SetError(f => f.Name, Localizer["DatabaseExistLog"]);
return Task.CompletedTask;
}
@@ -199,7 +199,7 @@ private Task OnInvalidComplexModel(EditContext context)
private Task OnValidComplexModel(EditContext context)
{
Logger5.Log(Localizer["OnValidSubmitCallBackLog"]);
- ComplexForm.SetError("Dummy.Dummy2.Name", Localizer["DatabaseExistLog"]);
+ ComplexForm?.SetError("Dummy.Dummy2.Name", Localizer["DatabaseExistLog"]);
return Task.CompletedTask;
}
@@ -280,29 +280,4 @@ private Task OnInvalidValidatableObject(EditContext context)
Logger8.Log(Localizer["OnInvalidSubmitCallBackLog"]);
return Task.CompletedTask;
}
-
- #region 参数说明
-
- ///
- /// 获得事件方法
- ///
- ///
- private MethodItem[] GetMethods() =>
- [
- new()
- {
- Name = "SetError",
- Description = Localizer["SetError"],
- Parameters = "PropertyName, ErrorMessage",
- ReturnValue = " — "
- },
- new()
- {
- Name = "Validate",
- Description = Localizer["Validate"],
- Parameters = " — ",
- ReturnValue = "boolean"
- }
- ];
- #endregion
}
diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json
index 9afe65914de..0485439f31a 100644
--- a/src/BootstrapBlazor.Server/Locales/en-US.json
+++ b/src/BootstrapBlazor.Server/Locales/en-US.json
@@ -60,9 +60,6 @@
"IntroductionText": "Documents",
"TutorialsText": "Tutorials"
},
- "BootstrapBlazor.Server.Components.Components.MethodTable": {
- "Title": "Methods"
- },
"BootstrapBlazor.Server.Components.Components.PackageTips": {
"Tips": "Precautions
This component relies on {0}, which needs to reference its component package when using this component
Nuget Install
Use nuget.org to install {0} component
"
},
diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json
index df44111e356..6e4efa45f0c 100644
--- a/src/BootstrapBlazor.Server/Locales/zh-CN.json
+++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json
@@ -60,9 +60,6 @@
"IntroductionText": "文档",
"TutorialsText": "实战"
},
- "BootstrapBlazor.Server.Components.Components.MethodTable": {
- "Title": "Methods 方法"
- },
"BootstrapBlazor.Server.Components.Components.PackageTips": {
"Tips": "注意事项 :
本组件依赖于 {0},使用本组件时需要引用其组件包
Nuget 包安装
使用 nuget.org 进行 {0} 组件的安装
"
},