Inheritance: System.EventArgs
Esempio n. 1
0
 private void CssOnFileUpdated(object sender, FileChangedEvent fileChangedEvent)
 {
     // Need to add the / at the start to make it absolute
     var path = "/" + FindFilePath(_cssPile, fileChangedEvent.Pile, fileChangedEvent.File);
     var id = FindFilePath(_cssPile, fileChangedEvent.Pile, fileChangedEvent.File, true).Replace("/", "-");
     BroadcastCssChange(id, path);
 }
Esempio n. 2
0
 private void CssOnFileUpdated(object sender, FileChangedEvent fileChangedEvent)
 {
     // Need to add the / at the start to make it absolute
     // Catch any exceptions as the virtualpathutility may not be initialised so do not need to broadcast
     try
     {
         var basePath = string.IsNullOrWhiteSpace(_config.CdnPath) ? VirtualPathUtility.ToAbsolute("~/") : _config.CdnPath.TrimEnd('/', '\\') + VirtualPathUtility.ToAbsolute("~/");
         var path = basePath + FindFilePath(_cssPile, fileChangedEvent.Pile, fileChangedEvent.File);
         var id = (VirtualPathUtility.ToAbsolute("~/") + FindFilePath(_cssPile, fileChangedEvent.Pile, fileChangedEvent.File, true)).Replace("/", "-").Trim('-');
         BroadcastCssChange(id, path);
     }
     catch (Exception) { }
 }