mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 17:31:42 +08:00
22 lines
579 B
C#
22 lines
579 B
C#
|
using System;
|
|||
|
|
|||
|
namespace AntDesign
|
|||
|
{
|
|||
|
public static class SelectModeExtensions
|
|||
|
{
|
|||
|
public const string Tags = "tags";
|
|||
|
public const string Multiple = "multiple";
|
|||
|
private const StringComparison Comparison = StringComparison.OrdinalIgnoreCase;
|
|||
|
|
|||
|
public static SelectMode ToSelectMode(this string mode)
|
|||
|
{
|
|||
|
if (Tags.Equals(mode, Comparison))
|
|||
|
{
|
|||
|
return SelectMode.Tags;
|
|||
|
}
|
|||
|
|
|||
|
return Multiple.Equals(mode, Comparison) ? SelectMode.Multiple : SelectMode.Default;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|