mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
63 lines
1.8 KiB
C#
63 lines
1.8 KiB
C#
namespace System.Web.Routing {
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
[TypeForwardedFrom("System.Web.Routing, Version=3.5.0.0, Culture=Neutral, PublicKeyToken=31bf3856ad364e35")]
|
|
public class RouteData {
|
|
private IRouteHandler _routeHandler;
|
|
private RouteValueDictionary _values = new RouteValueDictionary();
|
|
private RouteValueDictionary _dataTokens = new RouteValueDictionary();
|
|
|
|
public RouteData() {
|
|
}
|
|
|
|
public RouteData(RouteBase route, IRouteHandler routeHandler) {
|
|
Route = route;
|
|
RouteHandler = routeHandler;
|
|
}
|
|
|
|
public RouteValueDictionary DataTokens {
|
|
get {
|
|
return _dataTokens;
|
|
}
|
|
}
|
|
|
|
public RouteBase Route {
|
|
get;
|
|
set;
|
|
}
|
|
|
|
public IRouteHandler RouteHandler {
|
|
get {
|
|
return _routeHandler;
|
|
}
|
|
set {
|
|
_routeHandler = value;
|
|
}
|
|
}
|
|
|
|
public RouteValueDictionary Values {
|
|
get {
|
|
return _values;
|
|
}
|
|
}
|
|
|
|
public string GetRequiredString(string valueName) {
|
|
object value;
|
|
if (Values.TryGetValue(valueName, out value)) {
|
|
string valueString = value as string;
|
|
if (!String.IsNullOrEmpty(valueString)) {
|
|
return valueString;
|
|
}
|
|
}
|
|
throw new InvalidOperationException(
|
|
String.Format(
|
|
CultureInfo.CurrentUICulture,
|
|
SR.GetString(SR.RouteData_RequiredValue),
|
|
valueName));
|
|
}
|
|
}
|
|
}
|