コード例 #1
0
        public override Task <TwitterUser> Send(TwitterAccount account)
        {
            switch (_kind)
            {
            case RelationKind.Follow:
                return(account.CreateFriendshipAsync(_userId));

            case RelationKind.Unfollow:
                return(account.DestroyFriendshipAsync(_userId));

            case RelationKind.Block:
                return(account.CreateBlockAsync(_userId));

            case RelationKind.ReportAsSpam:
                return(account.ReportSpamAsync(_userId));

            case RelationKind.Unblock:
                return(account.DestroyBlockAsync(_userId));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }