Beispiel #1
0
        protected override void RegisterClasses()
        {
            ClassMapper
            .Add(() => IconProvider.Icon())
            .If(() => IconProvider.Get((IconName)Name), () => !IconProvider.IconNameAsContent && Name != null && Name is IconName)
            .If(() => IconProvider.Get((string)Name), () => !IconProvider.IconNameAsContent && Name != null && Name is string);

            base.RegisterClasses();
        }
Beispiel #2
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(IconProvider.Icon());

            if (!IconProvider.IconNameAsContent && Name != null && Name is IconName)
            {
                builder.Append(IconProvider.Get((IconName)Name));
            }

            if (!IconProvider.IconNameAsContent && Name != null && Name is string)
            {
                builder.Append(IconProvider.Get((string)Name));
            }

            base.BuildClasses(builder);
        }