/// <summary> /// The resolve core. /// </summary> /// <param name="source"> /// The source. /// </param> /// <returns> /// A collection of key value pairs that represent an <see cref="Core.Models.ExtendedDataCollection"/>. /// </returns> protected override IEnumerable <KeyValuePair <string, string> > ResolveCore(OfferComponentBase source) { return(source.OfferComponentDefinition.ExtendedData.AsEnumerable()); }
/// <summary> /// The to offer component definition display. /// </summary> /// <param name="component"> /// The offer component /// </param> /// <returns> /// The <see cref="OfferComponentDefinitionDisplay"/>. /// </returns> public static OfferComponentDefinitionDisplay ToOfferComponentDefinitionDisplay(this OfferComponentBase component) { return(AutoMapper.Mapper.Map <OfferComponentBase, OfferComponentDefinitionDisplay>(component)); }
/// <summary> /// Wrapper to retrieve the <see cref="OfferComponentAttribute"/>. /// </summary> /// <param name="component"> /// The component. /// </param> /// <returns> /// The <see cref="OfferComponentAttribute"/>. /// </returns> public static OfferComponentAttribute GetOfferComponentAttribute(this OfferComponentBase component) { return(component.GetType().GetCustomAttribute <OfferComponentAttribute>(false)); }