Skip to content

Commit 38ea0d9

Browse files
authored
doc(MethodTable): remove MethodTable component (#7580)
1 parent c267223 commit 38ea0d9

30 files changed

Lines changed: 21 additions & 532 deletions

src/BootstrapBlazor.Server/Components/Components/MethodTable.razor

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/BootstrapBlazor.Server/Components/Components/MethodTable.razor.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@page "/ajax"
1+
@page "/ajax"
22

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

@@ -30,5 +30,3 @@ var result = await AjaxService.InvokeAsync(option);</Pre>
3030
<Button OnClick="Goto">@Localizer["GoToButtonText1"]</Button>
3131
<Button OnClick="GotoSelf">@Localizer["GoToButtonText2"]</Button>
3232
</DemoBlock>
33-
34-
<MethodTable Items="@GetMethods()" />

src/BootstrapBlazor.Server/Components/Samples/Ajaxs.razor.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -63,21 +63,4 @@ class User
6363
private Task Goto() => AjaxService.Goto("/introduction");
6464

6565
private Task GotoSelf() => AjaxService.Goto("/ajax");
66-
private List<MethodItem> GetMethods() =>
67-
[
68-
new()
69-
{
70-
Name = "InvokeAsync",
71-
Description = Localizer["InvokeAsync"],
72-
Parameters = "AjaxOption",
73-
ReturnValue = "string"
74-
},
75-
new()
76-
{
77-
Name = "Goto",
78-
Description = Localizer["GoTo"],
79-
Parameters = "string",
80-
ReturnValue = " — "
81-
}
82-
];
8366
}

src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@page "/browser-finger"
1+
@page "/browser-finger"
22
@inject IStringLocalizer<BrowserFingers> Localizer
33

44
<DemoBlock Title="@Localizer["BrowserFingerTitle"]" Introduction="@Localizer["BrowserFingerIntro"]" ShowCode="false" Name="BrowserFinger">
@@ -10,6 +10,7 @@ private async Task GetFingerCodeAsync()
1010
{
1111
await BrowserFingerService.GetFingerCodeAsync();
1212
}</Pre>
13+
1314
<BootstrapInputGroup>
1415
<BootstrapInputGroupLabel DisplayText="Browser-Finger"></BootstrapInputGroupLabel>
1516
<BootstrapInput Value="@_code" Readonly="true" />
@@ -20,5 +21,3 @@ private async Task GetFingerCodeAsync()
2021
<BootstrapInput Value="@_clientHubId" Readonly="true" />
2122
</BootstrapInputGroup>
2223
</DemoBlock>
23-
24-
<MethodTable Items="GetMethods()" />

src/BootstrapBlazor.Server/Components/Samples/BrowserFingers.razor.cs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -32,22 +32,4 @@ protected override async Task OnInitializedAsync()
3232
private Task<string?> GetFingerCodeAsync() => BrowserFingerService.GetFingerCodeAsync();
3333

3434
private Task<string?> GetClientHubIdAsync() => BrowserFingerService.GetClientHubIdAsync();
35-
36-
private MethodItem[] GetMethods() =>
37-
[
38-
new()
39-
{
40-
Name = "GetFingerCodeAsync",
41-
Description = Localizer["GetFingerCodeAsync"],
42-
Parameters = " — ",
43-
ReturnValue = "Task<string?>"
44-
},
45-
new()
46-
{
47-
Name = "GetClientHubIdAsync",
48-
Description = Localizer["GetClientHubIdAsync"],
49-
Parameters = " — ",
50-
ReturnValue = "Task<string?>"
51-
}
52-
];
5335
}

src/BootstrapBlazor.Server/Components/Samples/Buttons.razor

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,3 @@
157157
</DemoBlock>
158158

159159
<AttributeTable Type="typeof(Button)" />
160-
161-
<EventTable Items="@GetEvents()" />
162-
163-
<MethodTable Items="@GetMethods()" />
Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -15,10 +15,6 @@ public sealed partial class Buttons
1515
[NotNull]
1616
private ConsoleLogger? NormalLogger { get; set; }
1717

18-
/// <summary>
19-
///
20-
/// </summary>
21-
/// <param name="e"></param>
2218
private void ButtonClick(MouseEventArgs e)
2319
{
2420
NormalLogger.Log($"Button Clicked");
@@ -52,35 +48,4 @@ private Task ClickButtonShowText(string text)
5248
}
5349

5450
private static Task ClickAsyncButton() => Task.Delay(5000);
55-
56-
/// <summary>
57-
/// 获得事件方法
58-
/// </summary>
59-
/// <returns></returns>
60-
private EventItem[] GetEvents() =>
61-
[
62-
new()
63-
{
64-
Name = "OnClick",
65-
Description = Localizer["EventDesc1"],
66-
Type ="EventCallback<MouseEventArgs>"
67-
},
68-
new()
69-
{
70-
Name = "OnClickWithoutRender",
71-
Description = Localizer["EventDesc2"],
72-
Type ="Func<Task>"
73-
}
74-
];
75-
76-
private MethodItem[] GetMethods() =>
77-
[
78-
new()
79-
{
80-
Name = "SetDisable",
81-
Description = Localizer["MethodDesc1"],
82-
Parameters = "disable",
83-
ReturnValue = " — "
84-
}
85-
];
8651
}

src/BootstrapBlazor.Server/Components/Samples/Captchas.razor

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,3 @@
1818
</DemoBlock>
1919

2020
<AttributeTable Type="typeof(Captcha)" />
21-
22-
<EventTable Items="@GetEvents()" />
23-
24-
<MethodTable Items="@GetMethods()" />
Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone
@@ -18,10 +18,6 @@ public sealed partial class Captchas
1818

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

21-
/// <summary>
22-
/// GetImageName
23-
/// </summary>
24-
/// <returns></returns>
2521
private string GetImageName()
2622
{
2723
var index = Convert.ToInt32(ImageRandomer.Next(0, 8) / 1.0);
@@ -31,14 +27,8 @@ private string GetImageName()
3127
return Path.Combine(ImagesPath, fileName);
3228
}
3329

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

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

@@ -68,33 +58,4 @@ private async Task OnValidAsync(bool ret)
6858
await NormalCaptcha.Reset();
6959
}
7060
}
71-
72-
/// <summary>
73-
/// 获得事件方法
74-
/// </summary>
75-
/// <returns></returns>
76-
private EventItem[] GetEvents() =>
77-
[
78-
new()
79-
{
80-
Name = "OnValid",
81-
Description = Localizer["OnValid"],
82-
Type ="Action<bool>"
83-
}
84-
];
85-
86-
/// <summary>
87-
/// 获得事件方法
88-
/// </summary>
89-
/// <returns></returns>
90-
private MethodItem[] GetMethods() =>
91-
[
92-
new()
93-
{
94-
Name = "GetImageName",
95-
Description = Localizer["GetImageName"],
96-
Parameters =" — ",
97-
ReturnValue = "string"
98-
}
99-
];
10061
}

0 commit comments

Comments
 (0)