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

19 lines
368 B
C#
Raw Normal View History

2019-12-08 00:51:07 +08:00
using System;
namespace AntDesign
2019-12-08 00:51:07 +08:00
{
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);
}
}
}