/// <summary> /// Initializes a new instance of the <see cref="PhotoTwitterCard"/> class. /// </summary> /// <param name="username">The username.</param> /// <param name="image">The image to use.</param> /// <exception cref="System.ArgumentNullException">username or image is <c>null</c>.</exception> public PhotoTwitterCard(string username, TwitterImage image) : base(username) { if (image == null) { throw new ArgumentNullException("image"); } this.image = image; }
/// <summary> /// Initializes a new instance of the <see cref="GalleryTwitterCard" /> class. /// </summary> /// <param name="username">The Twitter username of the creator of the content on the page e.g. @RehanSaeedUK. This is an optional property.</param> /// <param name="image0">The image0.</param> /// <param name="image1">The image1.</param> /// <param name="image2">The image2.</param> /// <param name="image3">The image3.</param> /// <exception cref="System.ArgumentNullException">username or image0 or image1 or image2 or image3 is <c>null</c>.</exception> public GalleryTwitterCard(string username, TwitterImage image0, TwitterImage image1, TwitterImage image2, TwitterImage image3) : base(username) { if (image0 == null) { throw new ArgumentNullException("image0"); } if (image1 == null) { throw new ArgumentNullException("image1"); } if (image2 == null) { throw new ArgumentNullException("image2"); } if (image3 == null) { throw new ArgumentNullException("image3"); } this.image0 = image0; this.image1 = image1; this.image2 = image2; this.image3 = image3; }
/// <summary> /// Initializes a new instance of the <see cref="PlayerTwitterCard" /> class. /// </summary> /// <param name="username">The Twitter username associated with the page e.g. @RehanSaeedUK. This is a required property.</param> /// <param name="image">The image to be displayed in place of the player on platforms that don’t support iframes or inline players. /// You should make this image the same dimensions as your player. Images with fewer than 68,600 pixels /// (a 262x262 square image, or a 350x196 16:9 image) will cause the player card not to render. /// Image must be less than 1MB in size.</param> /// <param name="player">The video player.</param> /// <exception cref="System.ArgumentNullException">username is <c>null</c>.</exception> public PlayerTwitterCard(string username, TwitterImage image, TwitterPlayer player) : base(username) { if (image == null) { throw new ArgumentNullException("image"); } if (player == null) { throw new ArgumentNullException("player"); } this.image = image; this.player = player; }