Ejemplo n.º 1
0
        private ReferenceComponentPart <TComponent> Component <TComponent>(Member member)
        {
            this.OnMemberMapped(member);
            ReferenceComponentPart <TComponent> referenceComponentPart = new ReferenceComponentPart <TComponent>(member, typeof(T));

            this.providers.Components.Add((IComponentMappingProvider)referenceComponentPart);
            return(referenceComponentPart);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a component reference. This is a place-holder for a component that is defined externally with a
        /// <see cref="ComponentMap{T}"/>; the mapping defined in said <see cref="ComponentMap{T}"/> will be merged
        /// with any options you specify from this call.
        /// </summary>
        /// <typeparam name="TComponent">Component type</typeparam>
        /// <param name="member">Property exposing the component</param>
        /// <returns>Component reference builder</returns>
        public virtual ReferenceComponentPart <TComponent> Component <TComponent>(Expression <Func <T, TComponent> > member)
        {
            var part = new ReferenceComponentPart <TComponent>(member.ToMember(), typeof(T));

            components.Add(part);

            return(part);
        }
Ejemplo n.º 3
0
        ReferenceComponentPart <TComponent> Component <TComponent>(Member member)
        {
            OnMemberMapped(member);

            var part = new ReferenceComponentPart <TComponent>(member, typeof(T));

            providers.Components.Add(part);

            return(part);
        }