C# Класс Subtext.Web.Controls.ScriptHelper

Contains helper methods for unpacking scripts embedded as assembly resources.
Показать файл Открыть проект

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

Метод Описание
UnpackScript ( string scriptName ) : string

Returns a string representation of the specified embedded script file. The script is wrapped with script start and end tags and assumes the script language is "vbscript" if the file extension is ".vbs" and "javascript" otherwise.

Using a naming convention, all scripts are placed in the Resources\Scripts folder. The ScriptName should just be the filename of the script. For example, if you embed a file at the following location "Resources\Scripts\MyScript.js", the ScriptName to pass is "MyScript.js".

UnpackScript ( string scriptName, string scriptLanguage ) : string

Returns a string representation of the specified embedded script file. The script is wrapped with script start and end tags and assumes the script language is "javascript".

Using a naming convention, all scripts are placed in the Resources\Scripts folder. The ScriptName should just be the filename of the script. For example, if you embed a file at the following location "Resources\Scripts\MyScript.js", the ScriptName to pass is "MyScript.js".

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

Метод Описание
UnpackEmbeddedResourceToString ( string resourceName ) : string

Unpacks the embedded resource to string.

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

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

Returns a string representation of the specified embedded script file. The script is wrapped with script start and end tags and assumes the script language is "vbscript" if the file extension is ".vbs" and "javascript" otherwise.
Using a naming convention, all scripts are placed in the Resources\Scripts folder. The ScriptName should just be the filename of the script. For example, if you embed a file at the following location "Resources\Scripts\MyScript.js", the ScriptName to pass is "MyScript.js".
public static UnpackScript ( string scriptName ) : string
scriptName string FileName of the script. Just the file name.
Результат string

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

Returns a string representation of the specified embedded script file. The script is wrapped with script start and end tags and assumes the script language is "javascript".
Using a naming convention, all scripts are placed in the Resources\Scripts folder. The ScriptName should just be the filename of the script. For example, if you embed a file at the following location "Resources\Scripts\MyScript.js", the ScriptName to pass is "MyScript.js".
public static UnpackScript ( string scriptName, string scriptLanguage ) : string
scriptName string FileName of the script. Just the file name.
scriptLanguage string The script language.
Результат string