<commit_before>using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using RestfulRouting.Mappings;
using System.Linq.Expressions;

namespace RestfulRouting
{
	public abstract class RouteSet
	{
		private Mapping _currentMapping;
		private RouteNames _names;
		private IList<Mapping> mappings = new List<Mapping>();
		private string _pathPrefix;
		public static Func<string, string> Singularize = x =>
		{
			var singular = x;
			try
			{
				singular = Inflector.Singularize(x);
			}
			catch
			{
			}
			return singular ?? x;
		};

		protected RouteSet()
		{
			_names = new RouteNames();
		}

		public void As(string resourceName)
		{
			_currentMapping.As(resourceName);
		}

		public void Only(params string[] actions)
		{
			_currentMapping.Only(actions);
		}

		public void Except(params string[] actions)<commit_msg>Add a constructor that takes route names<commit_after>using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using RestfulRouting.Mappings;
using System.Linq.Expressions;

namespace RestfulRouting
{
	public abstract class RouteSet
	{
		private Mapping _currentMapping;
		private RouteNames _names;
		private IList<Mapping> mappings = new List<Mapping>();
		private string _pathPrefix;
		public static Func<string, string> Singularize = x =>
		{
			var singular = x;
			try
			{
				singular = Inflector.Singularize(x);
			}
			catch
			{
			}
			return singular ?? x;
		};

		protected RouteSet(RouteNames names)
		{
			_names = names;
		}

		protected RouteSet()
		{
			_names = new RouteNames();
		}

		public void As(string resourceName)
		{
			_currentMapping.As(resourceName);
		}

		public void Only(params string[] actions)
		{
			_currentMapping.Only(actions);
		}

		public void Except(params string[] actions)
{'fraction_non_alphanumeric': 0.09559613319011816, 'fraction_numerical': 0.0, 'mean_word_length': 3.789203084832905, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2989375', 'n_tokens_mistral': 674, 'n_tokens_neox': 582, 'n_words': 152}