public CommentsMiddleware()

in src/React.Sample.Owin/CommentsMiddleware.cs [42:67]


        public CommentsMiddleware(Func<IDictionary<string, object>, Task> next)
        {
            _next = next;

            // In reality, you would use a repository or something for fetching data
            // For clarity, we'll just use a hard-coded list.
            var authors = new Dictionary<string, AuthorModel>
            {
                {"daniel", new AuthorModel { Name = "Daniel Lo Nigro", GithubUsername = "Daniel15" }},
                {"vjeux", new AuthorModel { Name = "Christopher Chedeau", GithubUsername = "vjeux" }},
                {"cpojer", new AuthorModel { Name = "Christoph Pojer", GithubUsername = "cpojer" }},
                {"jordwalke", new AuthorModel { Name = "Jordan Walke", GithubUsername = "jordwalke" }},
                {"zpao", new AuthorModel { Name = "Paul O'Shannessy", GithubUsername = "zpao" }},
            };

            _comments = new List<CommentModel>
            {
                new CommentModel { Author = authors["daniel"], Text = "First!!!!111!" },
                new CommentModel { Author = authors["zpao"], Text = "React is awesome!" },
                new CommentModel { Author = authors["cpojer"], Text = "Awesome!" },
                new CommentModel { Author = authors["vjeux"], Text = "Hello World" },
                new CommentModel { Author = authors["daniel"], Text = "Foo" },
                new CommentModel { Author = authors["daniel"], Text = "Bar" },
                new CommentModel { Author = authors["daniel"], Text = "FooBarBaz" },
            };
        }