/// <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> /// <param name="context">The context</param> /// <param name="imageName">Name of the image.</param> /// <returns></returns> public static T CoallesceTargetWithPreEntity <T>(this IPluginExecutionContext context, string imageName = DLaBExtendedPluginContextBase.PluginImageNames.PreImage) where T : Entity { return(DereferenceTarget <T>(context).CoallesceEntity(context.GetPreEntity <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> /// <param name="context">The context</param> /// <param name="imageName">Name of the image.</param> /// <returns></returns> public static T CoalesceTargetWithPreEntity <T>(this IPluginExecutionContext context, string imageName = null) where T : Entity { return(DereferenceTarget <T>(context).CoalesceEntity(context.GetPreEntity <T>(imageName))); }