ant-design-blazor/components/core/Helpers/ClassBuilderRuleGet.cs

19 lines
368 B
C#

using System;
namespace AntBlazor
{
public class ClassBuilderRuleGet<T> : ClassBuilderRule<T>
{
public Func<T, string> Func { get; set; }
public ClassBuilderRuleGet(Func<T, string> func)
{
Func = func;
}
public override string GetClass(T data)
{
return Func(data);
}
}
}