-
-
Notifications
You must be signed in to change notification settings - Fork 382
Expand file tree
/
Copy pathDrawerOptionExtensions.cs
More file actions
23 lines (21 loc) · 1012 Bytes
/
DrawerOptionExtensions.cs
File metadata and controls
23 lines (21 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// 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.Components;
/// <summary>
/// <para lang="zh"><see cref="DrawerOption"/> 扩展方法</para>
/// <para lang="en"><see cref="DrawerOption"/> Extensions</para>
/// </summary>
public static class DrawerOptionExtensions
{
/// <summary>
/// <para lang="zh">获得 组件渲染块</para>
/// <para lang="en">Get component render fragment</para>
/// </summary>
/// <param name="drawerOption">
/// <para lang="zh"><see cref="DrawerOption"/> 实例</para>
/// <para lang="en"><see cref="DrawerOption"/> instance</para>
/// </param>
public static RenderFragment? GetContent(this DrawerOption drawerOption) => drawerOption.ChildContent ?? drawerOption.Component?.Render();
}