CompareCloudware.Web/FluentSecurity/Extensions.cs
/// <summary>
/// Gets the area name of the route
/// </summary>
/// <param name="route">Route</param>
/// <returns>The name of the are</returns>
Gets the area name of the route
Gets the area name of the route
public static string GetAreaName(this RouteBase route)
        {
            var areRoute = route as IRouteWithArea;
            if (areRoute != null)
            {
                return areRoute.Area;
            }
            var standardRoute = route as Route;
            if ((standardRoute != null) && (standardRoute.DataTokens != null))
            {
                return (standardRoute.DataTokens["area"] as string) ?? string.Empty;
            }
            return string.Empty;
        }
public static string GetAreaName ( this RouteBase route ) { var areRoute = route as IRouteWithArea ; if ( areRoute != null ) { return areRoute . Area ; } var standardRoute = route as Route ; if ( ( standardRoute != null ) && ( standardRoute . DataTokens != null ) ) { return ( standardRoute . DataTokens [ " " ] as string ) ?? string . Empty ; } return string . Empty ; }
Gets the area name of the route
Gets the area name of the route
The name of the are
The name of the are
RouteBase
this
route
None