Ejemplo n.º 1
0
        public static async Task <int> Main(string[] aArgumentArray)
        {
            var authorManager = new AuthorManager();

            return(await Bootstrapper
                   .Factory
                   .CreateWeb(aArgumentArray)
                   .AddShortcode <GitShortCode>()
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorImage", Config.FromDocument((doc, ctx) => authorManager.AddImagePath(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorFacebook", Config.FromDocument((doc, ctx) => authorManager.AddAuthorFacebook(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorCodingGame", Config.FromDocument((doc, ctx) => authorManager.AddAuthorCodingGame(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorTwitter", Config.FromDocument((doc, ctx) => authorManager.AddAuthorTwitter(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorBio", Config.FromDocument((doc, ctx) => authorManager.AddAuthorBio(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorLinkedIn", Config.FromDocument((doc, ctx) => authorManager.AddAuthorLinkedIn(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("AuthorDiscord", Config.FromDocument((doc, ctx) => authorManager.AddAuthorDiscord(doc)))))
                   .ModifyPipeline(nameof(Inputs), aX => aX.ProcessModules.Add(new SetMetadata("ReadTime", Config.FromDocument((doc, ctx) => ReadTimeCalculator.CalculateReadingTime(doc)))))
                   .RunAsync());
        }