コード例 #1
0
        public async Task CreateListAsync_Requires_ListName()
        {
            InitializeTwitterContext();

            var ex = await L2TAssert.Throws <ArgumentException>(
                async() => await ctx.CreateListAsync(null, "public", "desc"));

            Assert.AreEqual("listName", ex.ParamName);
        }
コード例 #2
0
        static async Task CreateListAsync(TwitterContext twitterCtx)
        {
            List?list =
                await twitterCtx.CreateListAsync(
                    "linq-to-twitter", "public", "This is a test");

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