Get rid of Mandate
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Web.Http.Routing;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Exceptions;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi;
|
||||
@@ -52,8 +53,8 @@ namespace Umbraco.Web
|
||||
/// <returns></returns>
|
||||
public static string GetUmbracoApiService(this UrlHelper url, string actionName, Type apiControllerType, object id = null)
|
||||
{
|
||||
Mandate.ParameterNotNullOrEmpty(actionName, "actionName");
|
||||
Mandate.ParameterNotNull(apiControllerType, "apiControllerType");
|
||||
if (string.IsNullOrWhiteSpace(actionName)) throw new ArgumentNullOrEmptyException(nameof(actionName));
|
||||
if (apiControllerType == null) throw new ArgumentNullException(nameof(apiControllerType));
|
||||
|
||||
var area = "";
|
||||
|
||||
@@ -94,8 +95,8 @@ namespace Umbraco.Web
|
||||
/// <returns></returns>
|
||||
public static string GetUmbracoApiService(this UrlHelper url, string actionName, string controllerName, string area, object id = null)
|
||||
{
|
||||
Mandate.ParameterNotNullOrEmpty(controllerName, "controllerName");
|
||||
Mandate.ParameterNotNullOrEmpty(actionName, "actionName");
|
||||
if (string.IsNullOrWhiteSpace(actionName)) throw new ArgumentNullOrEmptyException(nameof(actionName));
|
||||
if (string.IsNullOrWhiteSpace(controllerName)) throw new ArgumentNullOrEmptyException(nameof(controllerName));
|
||||
|
||||
string routeName;
|
||||
if (area.IsNullOrWhiteSpace())
|
||||
|
||||
Reference in New Issue
Block a user