C# Class BlogEngine.Core.Web.Scripting.Helpers

Helper methods for script manipulations
Afficher le fichier Open project: rasmuskl/ReSharperCourse

Méthodes publiques

Méthode Description
AddBundledStylesAndScripts ( System page ) : void

Add bundles created by web.optimization

AddCustomCodeToHead ( System page ) : void

Adds code to the HTML head section.

AddGenericLink ( System page, string type, string relation, string title, string href ) : void

Add generic lit to the page

AddScript ( System page, string src, bool top = true, bool defer = false, bool asnc = false ) : void

Add javascript to page

AddStyle ( System page, string lnk ) : void

Add stylesheet to page header

AddTrackingScript ( System page ) : void

Adds a JavaScript to the bottom of the page at runtime.

You must add the script tags to the BlogSettings.Instance.TrackingScript.

FormatInlineScript ( string script ) : string

Format inline script

Method Details

AddBundledStylesAndScripts() public static méthode

Add bundles created by web.optimization
public static AddBundledStylesAndScripts ( System page ) : void
page System Base page
Résultat void

AddCustomCodeToHead() public static méthode

Adds code to the HTML head section.
public static AddCustomCodeToHead ( System page ) : void
page System
Résultat void

AddGenericLink() public static méthode

Add generic lit to the page
public static AddGenericLink ( System page, string type, string relation, string title, string href ) : void
page System Page
type string Type
relation string Relation
title string Title
href string Url
Résultat void

AddScript() public static méthode

Add javascript to page
public static AddScript ( System page, string src, bool top = true, bool defer = false, bool asnc = false ) : void
page System Page
src string Source
top bool If add to page header
defer bool Defer
asnc bool Async
Résultat void

AddStyle() public static méthode

Add stylesheet to page header
public static AddStyle ( System page, string lnk ) : void
page System Page
lnk string Href link
Résultat void

AddTrackingScript() public static méthode

Adds a JavaScript to the bottom of the page at runtime.
You must add the script tags to the BlogSettings.Instance.TrackingScript.
public static AddTrackingScript ( System page ) : void
page System
Résultat void

FormatInlineScript() public static méthode

Format inline script
public static FormatInlineScript ( string script ) : string
script string JavaScript code
Résultat string