OneReportAreaRegistration.cs
1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Web.Mvc;
using Vrh.OneReport;
namespace Vrh.Web.OneReport.Areas.OneReport
{
/// <summary>
/// OneReport area regisztrálásához való osztály.
/// </summary>
public class OneReportAreaRegistration : AreaRegistration
{
/// <summary>
/// Az area neve.
/// </summary>
public override string AreaName
{
get
{
return Constants.AREA_NAME;
}
}
/// <summary>
/// A regisztrációkor meghívott metódus.
/// </summary>
/// <param name="context"></param>
public override void RegisterArea(AreaRegistrationContext context)
{
RegisterRoutes(context);
//RegisterBundles(BundleTable.Bundles);
}
private void RegisterRoutes(AreaRegistrationContext context)
{
if (context == null) { throw new ArgumentNullException("context"); }
context.MapRoute(
string.Concat(Constants.AREA_NAME, "_default"),
string.Concat(Constants.AREA_NAME, "/{controller}/{action}/{id}"),
new { action = "Index", id = UrlParameter.Optional }
);
}
//private void RegisterBundles(BundleCollection bundles)
//{
// if (bundles == null) { throw new ArgumentNullException("bundles"); }
// #region Scripts (JS)
// /*** Base: Az alkalmazás általános JS (javascript) összetevői ***/
// bundles.Add(new ScriptBundle(Constants.BUNDLE_NAME)
// .Include("~/Scripts/jquery-{version}.slim.min.js"));
// #endregion Scripts (JS)
//}
}
}