DynamicComponentPart <IDictionary> DynamicComponent(Member member, Action <DynamicComponentPart <IDictionary> > dynamicComponentAction) { //PROTOTYPE1: ADDED var part = providers.Components.OfType <DynamicComponentPart <IDictionary> >().FirstOrDefault(p => p.Property.Name == member.Name); if (part == null) { //PROTOTYPE1: ADDED OnMemberMapped(member); part = new DynamicComponentPart <IDictionary>(typeof(T), member); //PROTOTYPE1: ADDED if (this.UseBackingField(member.Name)) { part.Access.CamelCaseField(Prefix.Underscore); } //PROTOTYPE1: ADDED dynamicComponentAction(part); //PROTOTYPE1: ADDED } //PROTOTYPE1: ADDED providers.Components.Add(part); return(part); }
private DynamicComponentPart <IDictionary> DynamicComponent(Member member, Action <DynamicComponentPart <IDictionary> > dynamicComponentAction) { this.OnMemberMapped(member); DynamicComponentPart <IDictionary> dynamicComponentPart = new DynamicComponentPart <IDictionary>(typeof(T), member); dynamicComponentAction(dynamicComponentPart); this.providers.Components.Add((IComponentMappingProvider)dynamicComponentPart); return(dynamicComponentPart); }
protected DynamicComponentPart <IDictionary> DynamicComponent(Member property, Action <DynamicComponentPart <IDictionary> > dynamicComponentAction) { var part = new DynamicComponentPart <IDictionary>(typeof(T), property); dynamicComponentAction(part); components.Add(part); return(part); }
DynamicComponentPart <IDictionary> DynamicComponent(Member member, Action <DynamicComponentPart <IDictionary> > dynamicComponentAction) { OnMemberMapped(member); var part = new DynamicComponentPart <IDictionary>(typeof(T), member); dynamicComponentAction(part); providers.Components.Add(part); return(part); }