Beispiel #1
0
 public static AFAttachment ToRpc(this MediaAttachment attachment)
 {
     return(new AFAttachment
     {
         ImageUrl = attachment.ImageUrl,
         VideoUrl = attachment.VideoUrl
     });
 }
Beispiel #2
0
 public NotificationContent WithMediaAttachment(MediaAttachment mediaAttachment)
 {
     _mediaAttachment = mediaAttachment;
     return(this);
 }
Beispiel #3
0
 public Builder WithVideo(byte[] videoBytes)
 {
     return(WithMediaAttachment(MediaAttachment.Video(videoBytes)));
 }
Beispiel #4
0
 /// <summary>
 /// Add media attachment.
 /// </summary>
 /// <param name="mediaAttachment">Media attachment.</param>
 /// <returns>The builder instance.</returns>
 public Builder WithMediaAttachment(MediaAttachment mediaAttachment)
 {
     _inviteContent._mediaAttachment = mediaAttachment;
     return(this);
 }
Beispiel #5
0
 public Builder WithImage(Texture2D image)
 {
     return(WithMediaAttachment(MediaAttachment.Image(image)));
 }
Beispiel #6
0
 public Builder WithImageUrl(string imageUrl)
 {
     return(WithMediaAttachment(MediaAttachment.ImageUrl(imageUrl)));
 }
 public static string GetVideoUrl(this MediaAttachment media)
 {
     return(media != null && media._method.Equals("videoUrl") ? media._object as string : null);
 }
 public static bool IsSupported(this MediaAttachment media)
 {
     return(media == null || media._method.Equals("imageUrl") || media._method.Equals("videoUrl"));
 }
 /// <summary>
 /// Add attachment to the post. Attachments will be returned in the same order as added.
 /// </summary>
 /// <param name="attachment">media attachment.</param>
 /// <returns>same instance for a method chaining.</returns>
 public ActivityContent AddMediaAttachment(MediaAttachment attachment)
 {
     Attachments.Add(attachment);
     return(this);
 }