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); } }
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); } }