当前位置: 首页>>代码示例>>C#>>正文


C# Slide.BulletPoint方法代码示例

本文整理汇总了C#中Slide.BulletPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Slide.BulletPoint方法的具体用法?C# Slide.BulletPoint怎么用?C# Slide.BulletPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Slide的用法示例。


在下文中一共展示了Slide.BulletPoint方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TransactionScopeIntroOrRefresh

        public async Task TransactionScopeIntroOrRefresh()
        {
            var slide = new Slide(title: "Transaction Scope Intro");
            await slide
                .BulletPoint("System.Transactions.TransactionScope")
                .BulletPoint("Implicit programing model / Ambient Transactions")
                .BulletPoint("Only works with async/await in .NET 4.5.1")
                .BulletPoint("Limited usefulness in cloud scenarios")
                .BulletPoint("Upgrades a local transaction to a distributed transaction")
                .BulletPoint("Ease of coding - If you prefer implicit over explicit")












                .Sample(() =>
                {
                    Assert.Null(Transaction.Current);

                    using (var tx = new TransactionScope())
                    {
                        Assert.NotNull(Transaction.Current);

                        SomeMethodInTheCallStack();

                        tx.Complete();
                    }

                    Assert.Null(Transaction.Current);
                });
        }
开发者ID:modulexcite,项目名称:AsyncTransactions,代码行数:38,代码来源:Script.cs

示例2: WhatDidWeJustLearn

 public async Task WhatDidWeJustLearn()
 {
     var slide = new Slide(title: "What did we just learn?");
     await slide
         .BulletPoint("Async void is evil! Use carefully.")
         .BulletPoint("Async all the way.")
         .BulletPoint("In a cloud first and async world try to avoid TransactionScope")
         .BulletPoint("Modern frameworks like EF6 (and higher) support own transactions")
         .BulletPoint("Use AsyncPump if you need TxScope and enlist your own stuff.")
         .BulletPoint("Write an async enabled library? ConfigureAwait(false) is your friend");
 }
开发者ID:modulexcite,项目名称:AsyncTransactions,代码行数:11,代码来源:Script.cs

示例3: Links

 public async Task Links()
 {
     var slide = new Slide(title: "Useful links");
     await slide
         .BulletPoint("Sample Code including Transcript of what I explained" +
                      "https://github.com/danielmarbach/AsyncTransactions")
         .BulletPoint("Six Essential Tips for Async - " +
                      "http://channel9.msdn.com/Series/Three-Essential-Tips-for-Async")
         .BulletPoint("Best Practices in Asynchronous Programming" +
                      "https://msdn.microsoft.com/en-us/magazine/jj991977.aspx")
         .BulletPoint("Participating in TransactionScopes and Async/Await" +
                      "http://www.planetgeek.ch/2014/12/07/participating-in-transactionscopes-and-asyncawait-introduction/")
         .BulletPoint("Working with Transactions (EF6 Onwards)" +
                      "https://msdn.microsoft.com/en-us/data/dn456843.aspx")
         .BulletPoint("Enlisting Resources as Participants in a Transaction" +
                      "https://msdn.microsoft.com/en-us/library/ms172153.aspx");
 }
开发者ID:modulexcite,项目名称:AsyncTransactions,代码行数:17,代码来源:Script.cs

示例4: StoreAsync

        public async Task StoreAsync(DatabaseMode mode)
        {
            var slide = new Slide(title: "Store Async");
            await slide
                .BulletPoint("OMG! You just rolled your own NoSQL database, right?")

                .Sample(async () =>
                {
                    var database = new Database("StoreAsync.received.txt", mode);
                    StoringTenSwissGuysInTheDatabase(database);

                    try
                    {
                        await database.SaveAsync().ConfigureAwait(false);
                    }
                    finally
                    {
                        database.Close();
                    }
                });
        }
开发者ID:modulexcite,项目名称:AsyncTransactions,代码行数:21,代码来源:Script.cs


注:本文中的Slide.BulletPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。