/// <summary>
        /// Select a broad casting way to delete post to a page
        /// </summary>
        /// <param name="post"></param>
        public async Task DeletePost(BroadcastPost model, Enums.BroadCastType BroadCastType)
        {
            try
            {
                switch (BroadCastType)
                {
                case Enums.BroadCastType.Web:
                    await BroadcastDeletePostToWeb(model);

                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionService.LogError("Error broadcasting post to page", ex);
            }
        }
        public async Task RejectUserFriendRequest(BroadcastFriendRequest model, Enums.BroadCastType broadCastType)
        {
            try
            {
                switch (broadCastType)
                {
                case Enums.BroadCastType.Web:
                    await BroadcastRejectUserFriendRequestToWeb(model);

                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionService.LogError("Error broadcasting cancel to page", ex);
            }
        }
        /// <summary>
        /// Select a broad casting way to new comment to a post
        /// </summary>
        /// <param name="post"></param>
        public async Task SendChatMessage(BroadcastChatMessage model, Enums.BroadCastType BroadCastType)
        {
            try
            {
                switch (BroadCastType)
                {
                case Enums.BroadCastType.Web:
                    await BroadcastChatMessageToWeb(model);

                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionService.LogError("Error broadcasting comment to post", ex);
            }
        }
        public async Task AcceptFriendRequest(BroadcastFriendRequest model, Enums.BroadCastType broadCastType)
        {
            try
            {
                switch (broadCastType)
                {
                case Enums.BroadCastType.Web:
                    await BroadcastAcceptFriendRequestToWeb(model);

                    break;
                }
            }
            catch (Exception ex)
            {
                ExceptionService.LogError("Error broadcasting comment to post", ex);
            }
        }
Exemple #5
0
 /// <summary>
 /// Get thumbnail of object supplied
 /// </summary>
 /// <param name="source"></param>
 /// <param name="thumbnail"></param>
 /// <returns></returns>
 public static async Task <string> GetThumbnail(string source, string thumbnail)
 {
     try
     {
         _ffmpeg.GetVideoThumbnail(source, thumbnail);
         return(thumbnail);
     }
     catch (Exception ex)
     {
         ex.HelpLink = "It can be due to incorrect file path.";
         ex.Data.Add("Location : ", "Exception occured while fetching thumbnail.");
         ex.Data.Add("Applpication Tier : ", "1. C4Connect");
         ex.Data.Add("Class : ", "File Handler");
         ex.Data.Add("Method : ", "GetThumbnail");
         ex.Data.Add("Input Parameters : ", string.Format("source: {0},thumbnail: {1}", source, thumbnail));
         ExceptionService.LogError("Error fetching thumbnail.", ex);
         return(null);
     }
 }