Esempio n. 1
0
        public async Task AddMemberToListAsync_Requires_UserID_Or_ScreenName()
        {
            InitializeTwitterContext();

            var ex = await L2TAssert.Throws <ArgumentException>(
                async() => await ctx.AddMemberToListAsync(null, 0, null, 0, null));

            Assert.AreEqual("UserIdOrScreenName", ex.ParamName);
        }
Esempio n. 2
0
        static async Task AddMemberToListAsync(TwitterContext twitterCtx)
        {
            string ownerScreenName = "Linq2Twitr";

            List?list =
                await twitterCtx.AddMemberToListAsync(
                    "Linq2Twitr", 0, "linq-to-twitter", 0, ownerScreenName);

            if (list != null)
            {
                Console.WriteLine("List Name: {0}, Description: {1}",
                                  list.Name, list.Description);
            }
        }