ComponentPart <TComponent> Component <TComponent>(Member member, Action <ComponentPart <TComponent> > action) { //PROTOTYPE1: ADDED var part = providers.Components.OfType <ComponentPart <TComponent> >().FirstOrDefault(p => p.Property.Name == member.Name); if (part == null) { //PROTOTYPE1: ADDED OnMemberMapped(member); part = new ComponentPart <TComponent>(typeof(T), member); //PROTOTYPE1: ADDED if (this.UseBackingField(member.Name)) { part.Access.CamelCaseField(Prefix.Underscore); } //PROTOTYPE1: ADDED if (action != null) { action(part); } providers.Components.Add(part); //PROTOTYPE1: ADDED } //PROTOTYPE1: ADDED return(part); }
protected virtual ComponentPart <TComponent> Component <TComponent>(Member property, Action <ComponentPart <TComponent> > action) { var part = new ComponentPart <TComponent>(typeof(T), property); action(part); components.Add(part); return(part); }
private ComponentPart <TComponent> Component <TComponent>(Member member, Action <ComponentPart <TComponent> > action) { this.OnMemberMapped(member); ComponentPart <TComponent> componentPart = new ComponentPart <TComponent>(typeof(T), member); if (action != null) { action(componentPart); } this.providers.Components.Add((IComponentMappingProvider)componentPart); return(componentPart); }
ComponentPart <TComponent> Component <TComponent>(Member member, Action <ComponentPart <TComponent> > action) { OnMemberMapped(member); var part = new ComponentPart <TComponent>(typeof(T), member); action(part); providers.Components.Add(part); return(part); }
protected ComponentPart <TComponent> Component <TComponent>(Member member, Action <ComponentPart <TComponent> > action) { OnMemberMapped(member); var part = new ComponentPart <TComponent>(typeof(T), member); if (action != null) { action(part); } providers.Components.Add(part); return(part); }