<commit_before>namespace Nancy.Demo.Hosting.Aspnet
{
    using System;
    using System.Linq;
    using Nancy.Demo.Hosting.Aspnet.Models;
    using Nancy.Routing;
    using Security;

    public class MainModule : NancyModule
    {
        public MainModule(IRouteCacheProvider routeCacheProvider)
        {
            Get["/"] = x => {
                return View["routes", routeCacheProvider.GetCache()];
            };

            Get["/negotiated"] = parameters =>{

                return Negotiate
                    .WithModel(new RatPack {FirstName = "Nancy "})
                    .WithMediaRangeModel("text/html", new RatPack {FirstName = "Nancy fancy pants"})
                    .WithView("negotiatedview");
            };

            Get["/filtered", r => true] = x => {
                return "This is a route with a filter that always returns true.";
            };

            Get["/filtered", r => false] = x => {
                return "This is also a route, but filtered out so should never be hit.";<commit_msg>Updated demo app to use negotiation syntax<commit_after>namespace Nancy.Demo.Hosting.Aspnet
{
    using System;
    using System.Linq;
    using Nancy.Demo.Hosting.Aspnet.Models;
    using Nancy.Routing;
    using Security;

    public class MainModule : NancyModule
    {
        public MainModule(IRouteCacheProvider routeCacheProvider)
        {
            Get["/"] = x => {
                return View["routes", routeCacheProvider.GetCache()];
            };

            Get["/negotiated"] = parameters => {
                return Negotiate
                    .WithModel(new RatPack {FirstName = "Nancy "})
                    .WithMediaRangeModel("text/html", new RatPack {FirstName = "Nancy fancy pants"})
                    .WithView("negotiatedview")
                    .WithHeader("X-Custom", "SomeValue");
            };

            Get["/filtered", r => true] = x => {
                return "This is a route with a filter that always returns true.";
            };

            Get["/filtered", r => false] = x => {
                return "This is also a route, but filtered out so should never be hit.";
{'fraction_non_alphanumeric': 0.11075069508804448, 'fraction_numerical': 0.0, 'mean_word_length': 1.7786357786357787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3006944', 'n_tokens_mistral': 577, 'n_tokens_neox': 542, 'n_words': 155}