/// <summary> /// Gets the entity post image. /// </summary> /// <typeparam name="T">Strongly-typed Entity.</typeparam> /// <param name="context">The context.</param> /// <param name="postImageName">Name of the post image.</param> /// <returns>Entity Post Image cast to type T.</returns> /// <exception cref="System.ArgumentNullException"> /// context /// or /// postImageName /// </exception> public static T GetPostEntityImage <T>(this IPluginExecutionContext context, string postImageName) where T : Entity { if (context == null) { throw new ArgumentNullException("context"); } if (postImageName == null) { throw new ArgumentNullException("postImageName"); } return(context.GetPostEntityImage(postImageName).ToEntity <T>()); }