/// <summary> /// Creates a new Entity of type T, adding the attributes from both the Target and the Post Image if they exist. /// Does not return null. /// Does not return a reference to Target /// </summary> /// <typeparam name="T"></typeparam> /// <param name="context">The context.</param> /// <param name="imageName">Name of the image.</param> /// <returns></returns> public static T CoallesceTargetWithPostEntity <T>(this IPluginExecutionContext context, string imageName = DLaBExtendedPluginContextBase.PluginImageNames.PostImage) where T : Entity { return(DereferenceTarget <T>(context).CoallesceEntity(context.GetPostEntity <T>(imageName))); }
/// <summary> /// Creates a new Entity of type T, adding the attributes from both the Target and the Post Image if they exist. /// If imageName is null, the first non-null image found is used. /// Does not return null. /// Does not return a reference to Target /// </summary> /// <typeparam name="T"></typeparam> /// <param name="context">The context.</param> /// <param name="imageName">Name of the image.</param> /// <returns></returns> public static T CoalesceTargetWithPostEntity <T>(this IPluginExecutionContext context, string imageName = null) where T : Entity { return(DereferenceTarget <T>(context).CoalesceEntity(context.GetPostEntity <T>(imageName))); }