C# Class Open.Core.Web.Script

Constants and helpers for working with script.
Retrieve instance from [WebConstants].
显示文件 Open project: philcockfield/Open.TestHarness.SL

Public Methods

Method Description
EntryPoint ( string initMethod ) : string

Creates an entry point script for a Script# application.

Path ( ScriptFile script ) : string

Retreives the path to the specified script.

Script ( ) : System

Constructor.

ToScriptLink ( string url, string type = TextJavascript ) : string

Formats the given URL into a SCRIPT tag.

TypeKit ( string id ) : string

Creates the TypeKit embed tag.

WithinBlock ( string script, string type = TextJavascript ) : string

Inserts the given script witin a SCRIPT tag.

this ( ScriptFile scriptFile ) : string

Gets the embed tag for the specified script.

Private Methods

Method Description
GetBasePath ( ScriptFile scriptFile ) : string
UseDefaultPath ( ScriptFile scriptFile ) : bool

Method Details

EntryPoint() public static method

Creates an entry point script for a Script# application.
public static EntryPoint ( string initMethod ) : string
initMethod string The entry point initialization method (eg. 'MyNamespace.Application.main').
return string

Path() public method

Retreives the path to the specified script.
public Path ( ScriptFile script ) : string
script ScriptFile The script to retrieve the path for.
return string

Script() public method

Constructor.
public Script ( ) : System
return System

ToScriptLink() public static method

Formats the given URL into a SCRIPT tag.
public static ToScriptLink ( string url, string type = TextJavascript ) : string
url string The path to the script file.
type string The script language type.
return string

TypeKit() public method

Creates the TypeKit embed tag.
public TypeKit ( string id ) : string
id string The ID for the typekit instance.
return string

WithinBlock() public static method

Inserts the given script witin a SCRIPT tag.
public static WithinBlock ( string script, string type = TextJavascript ) : string
script string The script to embed
type string The script language type.
return string

this() public method

Gets the embed tag for the specified script.
public this ( ScriptFile scriptFile ) : string
scriptFile ScriptFile Flag indicating what script to retrieve the path for.
return string