Blame view

Vrh.Web.OneReport.Lib/ReportViewerForMVC/WebResourceHelper.cs 718 Bytes
ab9f2fbe   Schwirg László   Add project files.
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
  using System;
  using System.Web.UI;
  
  namespace Vrh.Web.OneReport.ReportViewerForMvc
  {
      internal static class WebResourceHelper
      {
          internal static string GetWebResourceUrl(Type type, string resourceName)
          {
              string resourceUrl = null;
  
              Page page = new Page();
              try
              {
                  resourceUrl = page.ClientScript.GetWebResourceUrl(type, resourceName);
              }
              catch (ArgumentNullException)
              {
                  //TODO: Validate if IIS is not running. Unit testing fails due basepath is null.
                  //in the meanwhile do nothing ...like my boss.
              } 
  
              return resourceUrl;
          }
      }
  
  }