Example #1
0
        internal static void MapFields(BlazorComponent o)
        {
            var mappedFields = DevUtils
                               .GetAllFields(o)
                               .Where(x => x.CustomAttributes.Any(y => y.AttributeType == typeof(DevMapAttribute)));

            foreach (var field in mappedFields)
            {
                Dev.Map(o, field.GetValue(o),
                        ((DevMapAttribute)field.GetCustomAttributes(typeof(DevMapAttribute), false)[0]).MapName);
            }
        }
Example #2
0
        internal static void MapProperties(BlazorComponent o)
        {
            var mappedProperties = DevUtils
                                   .GetAllProperties(o)
                                   .Where(x => x.CustomAttributes.Any(y => y.AttributeType == typeof(DevMapAttribute)));

            foreach (var property in mappedProperties)
            {
                Dev.Map(o, property.GetValue(o),
                        ((DevMapAttribute)property.GetCustomAttributes(typeof(DevMapAttribute), false)[0]).MapName);
            }
        }
Example #3
0
 internal static void DevError(string message) => Dev.Error($"BlazorUtils.Dev: {message}");
Example #4
0
 internal static async Task DevWarnAsync(string message) => await Dev.WarnAsync($"BlazorUtils.Dev: {message}");
Example #5
0
 internal static void DevWarn(string message) => Dev.Warn($"BlazorUtils.Dev: {message}");