Ejemplo n.º 1
0
        /// <summary>
        /// Get a single content share by its id and associated user.
        /// </summary>
        /// <param name="shareId">The id of the share.</param>
        /// <param name="userId">(Optional) The user with whom the share is associated with. Self by default.</param>
        /// <returns>The share.</returns>
        /// <remarks>
        /// The current user must be an observer of <paramref name="userId"/>, or an administrator.
        /// </remarks>
        public async Task <ContentShare> GetContentShare(ulong shareId, ulong?userId = null)
        {
            var response = await _client.GetAsync($"users/{userId.IdOrSelf()}/content_shares/{shareId}");

            var model = JsonConvert.DeserializeObject <ContentShareModel>(await response.Content.ReadAsStringAsync());

            return(ContentShare.NewContentShare(this, model));
        }
Ejemplo n.º 2
0
 public async Task<ContentShare> GetbycontentID (int contentid, [FromBody] UserDetails item)
 {
     try{
      ContentShare todo =await _context.ContentShare.FirstOrDefaultAsync(t => t.ContentID == contentid);
      return todo;
     }
     catch(Exception ex){
         throw new Exception(ex.Message);
     }
 }
Ejemplo n.º 3
0
 public async Task Post([FromBody] ContentShare item)
 {
     try
     {
         item.CreatedOn  = System.DateTime.Now;
         item.ModifiedOn = System.DateTime.Now;
         _context.ContentShare.Add(item);
         await _context.SaveChangesAsync();
     }catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Ejemplo n.º 4
0
        public async Task <ContentShare> CreateContentShare([NotNull] IEnumerable <ulong> receivers,
                                                            ContentShareType contentType,
                                                            ulong contentId,
                                                            ulong?senderId = null)
        {
            var args = new List <(string, string)> {
                ("content_id", contentId.ToString()),
                ("content_type", contentType.GetApiRepresentation())
            };

            args.AddRange(receivers.Select(id => ("receiver_ids[]", id.ToString())));

            var response = await _client.PostAsync($"users/{senderId?.ToString() ?? "self"}/content_shares",
                                                   BuildHttpArguments(args));

            var model = JsonConvert.DeserializeObject <ContentShareModel>(await response.Content.ReadAsStringAsync());

            return(ContentShare.NewContentShare(this, model));
        }
Ejemplo n.º 5
0
        void ReleaseDesignerOutlets()
        {
            if (Actor_Name != null)
            {
                Actor_Name.Dispose();
                Actor_Name = null;
            }

            if (Actor_NameHeight != null)
            {
                Actor_NameHeight.Dispose();
                Actor_NameHeight = null;
            }

            if (ActorImage != null)
            {
                ActorImage.Dispose();
                ActorImage = null;
            }

            if (BackgroundContentFriendJoined != null)
            {
                BackgroundContentFriendJoined.Dispose();
                BackgroundContentFriendJoined = null;
            }

            if (BackgroundProductSold != null)
            {
                BackgroundProductSold.Dispose();
                BackgroundProductSold = null;
            }

            if (btn_OtherUsers != null)
            {
                btn_OtherUsers.Dispose();
                btn_OtherUsers = null;
            }

            if (btnDotsTop != null)
            {
                btnDotsTop.Dispose();
                btnDotsTop = null;
            }

            if (btnOpenInvitedProfile != null)
            {
                btnOpenInvitedProfile.Dispose();
                btnOpenInvitedProfile = null;
            }

            if (ButtonFacebook != null)
            {
                ButtonFacebook.Dispose();
                ButtonFacebook = null;
            }

            if (ButtonInviteFriends != null)
            {
                ButtonInviteFriends.Dispose();
                ButtonInviteFriends = null;
            }

            if (ButtonProductSold != null)
            {
                ButtonProductSold.Dispose();
                ButtonProductSold = null;
            }

            if (ButtonRewardClaimed != null)
            {
                ButtonRewardClaimed.Dispose();
                ButtonRewardClaimed = null;
            }

            if (ButtonTwitter != null)
            {
                ButtonTwitter.Dispose();
                ButtonTwitter = null;
            }

            if (CollectionUserView != null)
            {
                CollectionUserView.Dispose();
                CollectionUserView = null;
            }

            if (CommentButton != null)
            {
                CommentButton.Dispose();
                CommentButton = null;
            }

            if (CommentsText != null)
            {
                CommentsText.Dispose();
                CommentsText = null;
            }

            if (ContectRewardClaimed != null)
            {
                ContectRewardClaimed.Dispose();
                ContectRewardClaimed = null;
            }

            if (ContectRewardClaimedAspectRatio != null)
            {
                ContectRewardClaimedAspectRatio.Dispose();
                ContectRewardClaimedAspectRatio = null;
            }

            if (ContectRewardClaimedRightBackground != null)
            {
                ContectRewardClaimedRightBackground.Dispose();
                ContectRewardClaimedRightBackground = null;
            }

            if (ContectRewardClaimedTitle != null)
            {
                ContectRewardClaimedTitle.Dispose();
                ContectRewardClaimedTitle = null;
            }

            if (ContentCollectionAvatarView != null)
            {
                ContentCollectionAvatarView.Dispose();
                ContentCollectionAvatarView = null;
            }

            if (ContentCollectionAvatarViewAspectRatio != null)
            {
                ContentCollectionAvatarViewAspectRatio.Dispose();
                ContentCollectionAvatarViewAspectRatio = null;
            }

            if (ContentCollectionCheckInView != null)
            {
                ContentCollectionCheckInView.Dispose();
                ContentCollectionCheckInView = null;
            }

            if (ContentCollectionCheckInViewAspectRatio != null)
            {
                ContentCollectionCheckInViewAspectRatio.Dispose();
                ContentCollectionCheckInViewAspectRatio = null;
            }

            if (ContentFriendJoined != null)
            {
                ContentFriendJoined.Dispose();
                ContentFriendJoined = null;
            }

            if (ContentFriendJoinedAspectRatio != null)
            {
                ContentFriendJoinedAspectRatio.Dispose();
                ContentFriendJoinedAspectRatio = null;
            }

            if (ContentFriendJoinedBackground != null)
            {
                ContentFriendJoinedBackground.Dispose();
                ContentFriendJoinedBackground = null;
            }

            if (ContentFriendJoinedPhoto != null)
            {
                ContentFriendJoinedPhoto.Dispose();
                ContentFriendJoinedPhoto = null;
            }

            if (ContentFriendJoinedUserName != null)
            {
                ContentFriendJoinedUserName.Dispose();
                ContentFriendJoinedUserName = null;
            }

            if (ContentHeaderView != null)
            {
                ContentHeaderView.Dispose();
                ContentHeaderView = null;
            }

            if (ContentImage != null)
            {
                ContentImage.Dispose();
                ContentImage = null;
            }

            if (ContentImageAspectRatio != null)
            {
                ContentImageAspectRatio.Dispose();
                ContentImageAspectRatio = null;
            }

            if (ContentImageTextCaption != null)
            {
                ContentImageTextCaption.Dispose();
                ContentImageTextCaption = null;
            }

            if (ContentMap != null)
            {
                ContentMap.Dispose();
                ContentMap = null;
            }

            if (ContentMapAspectRatio != null)
            {
                ContentMapAspectRatio.Dispose();
                ContentMapAspectRatio = null;
            }

            if (ContentMapView != null)
            {
                ContentMapView.Dispose();
                ContentMapView = null;
            }

            if (ContentProductSold != null)
            {
                ContentProductSold.Dispose();
                ContentProductSold = null;
            }

            if (ContentProductSoldAspectRatio != null)
            {
                ContentProductSoldAspectRatio.Dispose();
                ContentProductSoldAspectRatio = null;
            }

            if (ContentProductSoldTextView != null)
            {
                ContentProductSoldTextView.Dispose();
                ContentProductSoldTextView = null;
            }

            if (ContentShare != null)
            {
                ContentShare.Dispose();
                ContentShare = null;
            }

            if (ContentShareAspectRatio != null)
            {
                ContentShareAspectRatio.Dispose();
                ContentShareAspectRatio = null;
            }

            if (ContentText != null)
            {
                ContentText.Dispose();
                ContentText = null;
            }

            if (ContentTextHeight != null)
            {
                ContentTextHeight.Dispose();
                ContentTextHeight = null;
            }

            if (ContentVideo != null)
            {
                ContentVideo.Dispose();
                ContentVideo = null;
            }

            if (ContentVideoAspectRatio != null)
            {
                ContentVideoAspectRatio.Dispose();
                ContentVideoAspectRatio = null;
            }

            if (ContentVideoButtonPlay != null)
            {
                ContentVideoButtonPlay.Dispose();
                ContentVideoButtonPlay = null;
            }

            if (ContentWebView != null)
            {
                ContentWebView.Dispose();
                ContentWebView = null;
            }

            if (ContentWebViewAspectRatio != null)
            {
                ContentWebViewAspectRatio.Dispose();
                ContentWebViewAspectRatio = null;
            }

            if (Creation_Date != null)
            {
                Creation_Date.Dispose();
                Creation_Date = null;
            }

            if (Creation_DateHeight != null)
            {
                Creation_DateHeight.Dispose();
                Creation_DateHeight = null;
            }

            if (GradientImageView != null)
            {
                GradientImageView.Dispose();
                GradientImageView = null;
            }

            if (GradientImageViewAspect != null)
            {
                GradientImageViewAspect.Dispose();
                GradientImageViewAspect = null;
            }

            if (IconContentFriendJoined != null)
            {
                IconContentFriendJoined.Dispose();
                IconContentFriendJoined = null;
            }

            if (IconProductSold != null)
            {
                IconProductSold.Dispose();
                IconProductSold = null;
            }

            if (Label_ContectReward_Claimed != null)
            {
                Label_ContectReward_Claimed.Dispose();
                Label_ContectReward_Claimed = null;
            }

            if (LabelFriendsWelcome != null)
            {
                LabelFriendsWelcome.Dispose();
                LabelFriendsWelcome = null;
            }

            if (LikeButton != null)
            {
                LikeButton.Dispose();
                LikeButton = null;
            }

            if (LikesText != null)
            {
                LikesText.Dispose();
                LikesText = null;
            }

            if (LikesView != null)
            {
                LikesView.Dispose();
                LikesView = null;
            }

            if (LikesViewHeightAspecnRatio != null)
            {
                LikesViewHeightAspecnRatio.Dispose();
                LikesViewHeightAspecnRatio = null;
            }

            if (LineSeparator != null)
            {
                LineSeparator.Dispose();
                LineSeparator = null;
            }

            if (MainBackgroundView != null)
            {
                MainBackgroundView.Dispose();
                MainBackgroundView = null;
            }

            if (MainView != null)
            {
                MainView.Dispose();
                MainView = null;
            }

            if (PointsIconWidthConstraint != null)
            {
                PointsIconWidthConstraint.Dispose();
                PointsIconWidthConstraint = null;
            }

            if (ProductSoldCount != null)
            {
                ProductSoldCount.Dispose();
                ProductSoldCount = null;
            }

            if (ProductSoldMainBackground != null)
            {
                ProductSoldMainBackground.Dispose();
                ProductSoldMainBackground = null;
            }

            if (ProductSoldTitle != null)
            {
                ProductSoldTitle.Dispose();
                ProductSoldTitle = null;
            }

            if (ProductSoldUpBackground != null)
            {
                ProductSoldUpBackground.Dispose();
                ProductSoldUpBackground = null;
            }

            if (PtsText != null)
            {
                PtsText.Dispose();
                PtsText = null;
            }

            if (ReadCommentButtonHeight != null)
            {
                ReadCommentButtonHeight.Dispose();
                ReadCommentButtonHeight = null;
            }

            if (ReadCommentsButton != null)
            {
                ReadCommentsButton.Dispose();
                ReadCommentsButton = null;
            }

            if (RewardClaimedCount != null)
            {
                RewardClaimedCount.Dispose();
                RewardClaimedCount = null;
            }

            if (SmileButton != null)
            {
                SmileButton.Dispose();
                SmileButton = null;
            }

            if (TextContentFriendJoined != null)
            {
                TextContentFriendJoined.Dispose();
                TextContentFriendJoined = null;
            }

            if (TextProductSold != null)
            {
                TextProductSold.Dispose();
                TextProductSold = null;
            }

            if (TextQuoteLineSeparatorHeight != null)
            {
                TextQuoteLineSeparatorHeight.Dispose();
                TextQuoteLineSeparatorHeight = null;
            }

            if (TopActionText != null)
            {
                TopActionText.Dispose();
                TopActionText = null;
            }

            if (TopActionTextHeight != null)
            {
                TopActionTextHeight.Dispose();
                TopActionTextHeight = null;
            }

            if (TopPaddingView != null)
            {
                TopPaddingView.Dispose();
                TopPaddingView = null;
            }

            if (TopPaddingViewAspect != null)
            {
                TopPaddingViewAspect.Dispose();
                TopPaddingViewAspect = null;
            }

            if (TopView != null)
            {
                TopView.Dispose();
                TopView = null;
            }

            if (TopViewHeight != null)
            {
                TopViewHeight.Dispose();
                TopViewHeight = null;
            }

            if (uiProfileButton != null)
            {
                uiProfileButton.Dispose();
                uiProfileButton = null;
            }

            if (vDotsTop != null)
            {
                vDotsTop.Dispose();
                vDotsTop = null;
            }

            if (vDotsTopHeight != null)
            {
                vDotsTopHeight.Dispose();
                vDotsTopHeight = null;
            }
        }