// 6.0 TODO: Move to IComponentAttributesMapper public static void LazyGroup(this IComponentAttributesMapper mapper, string name) { if (mapper is ComponentMapper component) { component.LazyGroup(name); } }
// 6.0 TODO: Move to IComponentAttributesMapper<TComponent> public static void LazyGroup <TComponent>(this IComponentAttributesMapper <TComponent> mapper, string name) { if (mapper is ComponentCustomizer <TComponent> component) { component.LazyGroup(name); } else if (mapper is ComponentElementCustomizer <TComponent> componentElement) { componentElement.LazyGroup(name); } }
protected virtual void ComponentParentNoSetterToField(IModelInspector modelInspector, PropertyPath member, IComponentAttributesMapper componentMapper) { System.Type componentType = member.LocalMember.GetPropertyOrFieldType(); IEnumerable<MemberInfo> persistentProperties = MembersProvider.GetComponentMembers(componentType).Where(p => ModelInspector.IsPersistentProperty(p)); MemberInfo parentReferenceProperty = GetComponentParentReferenceProperty(persistentProperties, member.LocalMember.ReflectedType); if (parentReferenceProperty != null && MatchNoSetterProperty(parentReferenceProperty)) { componentMapper.Parent(parentReferenceProperty, cp => cp.Access(Accessor.NoSetter)); } }
protected virtual void ComponentParentNoSetterToField(IModelInspector modelInspector, PropertyPath member, IComponentAttributesMapper componentMapper) { Type componentType = member.LocalMember.GetPropertyOrFieldType(); IEnumerable <MemberInfo> persistentProperties = MembersProvider .GetComponentMembers(componentType) .Where(p => ModelInspector.IsPersistentProperty(p)); MemberInfo parentReferenceProperty = GetComponentParentReferenceProperty(persistentProperties, member.LocalMember.ReflectedType); if (parentReferenceProperty != null && MatchNoSetterProperty(parentReferenceProperty)) { componentMapper.Parent(parentReferenceProperty, cp => cp.Access(Accessor.NoSetter)); } }
public static void MapComponent(IModelInspector modelInspector, PropertyPath member, IComponentAttributesMapper map) { }
public void InvokeCustomizers(PropertyPath member, IComponentAttributesMapper mapper) { InvokeCustomizers(componentPropertyCustomizers, member, mapper); }
public void InvokeCustomizers(System.Type type, IComponentAttributesMapper mapper) { InvokeCustomizers(componentClassCustomizers, type, mapper); }
protected virtual void OnBeforeMapComponent(IModelInspector modelInspector, PropertyPath member, IComponentAttributesMapper propertyCustomizer) { }
private void DisableComponentParentAutomapping(IModelInspector inspector, PropertyPath member, IComponentAttributesMapper customizer) { var parentMapping = member.LocalMember.GetPropertyOrFieldType().GetFirstPropertyOfType(member.Owner()); DisableAutomappingFor(parentMapping); }
protected virtual void OnAfterMapComponent(IModelInspector modelInspector, PropertyPath member, IComponentAttributesMapper propertyCustomizer) { }