Rebel.Cms.Web.RouteValueDictionaryExtensions.GetRequiredObject C# (CSharp) Method

GetRequiredObject() public static method

Returns the value of a mandatory item in the route items
public static GetRequiredObject ( this items, string key ) : object
items this
key string
return object
        public static object GetRequiredObject(this RouteValueDictionary items, string key)
        {
            if (!items.Keys.Contains(key))
                throw new ArgumentNullException("The " + key + " query string parameter was not found but is required");
            return items[key];
        }
RouteValueDictionaryExtensions