C# Класс Open.Core.Web.Script

Constants and helpers for working with script.
Retrieve instance from [WebConstants].
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
GetBasePath ( ScriptFile scriptFile ) : string
UseDefaultPath ( ScriptFile scriptFile ) : bool

Описание методов

EntryPoint() публичный статический Метод

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').
Результат string

Path() публичный Метод

Retreives the path to the specified script.
public Path ( ScriptFile script ) : string
script ScriptFile The script to retrieve the path for.
Результат string

Script() публичный Метод

Constructor.
public Script ( ) : System
Результат System

ToScriptLink() публичный статический Метод

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.
Результат string

TypeKit() публичный Метод

Creates the TypeKit embed tag.
public TypeKit ( string id ) : string
id string The ID for the typekit instance.
Результат string

WithinBlock() публичный статический Метод

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.
Результат string

this() публичный Метод

Gets the embed tag for the specified script.
public this ( ScriptFile scriptFile ) : string
scriptFile ScriptFile Flag indicating what script to retrieve the path for.
Результат string