/// <summary>Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Return the CSS data that is included in the subscription mail. /// By default this means fetching the contents of the file defined by the key /// EPsEditCSS in web.config. Any C style comments are automatically removed from the /// string before it is returned. /// </summary> /// <returns>A string with CSS data</returns> /// <remarks>Do not include any <style> tags in the string that is returned.</remarks> /// <exclude /> public virtual string GetCSSContents() { string input = string.Empty; string[] strArray = Settings.Instance.UIEditorCssPaths.Split(','); if (strArray.Length == 0) { return(string.Empty); } string virtualPath = UriSupport.ResolveUrlBySettings(strArray[0]); if (GenericHostingEnvironment.VirtualPathProvider.FileExists(virtualPath)) { TextReader textReader = (TextReader)null; try { textReader = (TextReader) new StreamReader(GenericHostingEnvironment.VirtualPathProvider.GetFile(virtualPath).Open()); input = textReader.ReadToEnd(); } finally { if (textReader != null) { textReader.Close(); } } SubscriptionMail.log.Debug((object)string.Format("4.3.3 Stylesheet used to format subscription mail: {0} ({1} bytes)", (object)virtualPath, (object)input.Length)); } else { SubscriptionMail.log.Warn((object)string.Format("4.3.4 Stylesheet not found: {0}", (object)virtualPath)); } return(Regex.Replace(input, "/\\*.*(?>\\*/)", string.Empty).Trim()); }
protected string GetPdfUrl() { if (Locate.ContentRepository().Get <EventPageBase>(CurrentData.EventPage).EventDetails.PdfTemplate != null) { return(String.Format("<a class=\"btn btn-default btn-sm\" href=\"{0}?participant={1}&code={2}&email={3}\" target=\"_blank\">PDF</a>", UriSupport.ResolveUrlBySettings("~/Modules/BVNetwork.Attend/Views/Pages/Pdf.aspx"), CurrentData.Code, CurrentData.Code, CurrentData.Email)); } return(string.Empty); }