C# 클래스 Subtext.Web.Controls.ScriptHelper

Contains helper methods for unpacking scripts embedded as assembly resources.
파일 보기 프로젝트 열기: ayende/Subtext

공개 메소드들

메소드 설명
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