ant-design-blazor/components/select/internal/SelectModeExtensions.cs
ElDiddi 41077bc2fb refactor(module: select): completely new (#800)
* select-rewritten

select-rewritten

* modul: select - update 1

* select-update2

* select-update3

* select-update 4

* feat: append label tag & auto tokenization

* fix: conflict in drpdown demo

Co-authored-by: Lars Diederich <diederich@evodata.de>
Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-11-27 13:13:26 +08:00

24 lines
664 B
C#

using System;
#pragma warning disable 1591 // Disable missing XML comment
namespace AntDesign.Select.Internal
{
internal static class SelectModeExtensions
{
internal const string Tags = "tags";
internal const string Multiple = "multiple";
private const StringComparison Comparison = StringComparison.OrdinalIgnoreCase;
internal static SelectMode ToSelectMode(this string mode)
{
if (Tags.Equals(mode, Comparison))
{
return SelectMode.Tags;
}
return Multiple.Equals(mode, Comparison) ? SelectMode.Multiple : SelectMode.Default;
}
}
}