ProtectedScripts
Assembly: ServiceStack.Common.dll
View Source
public class ProtectedScripts : ScriptMethods
Inherited Properties
Context
View Source
public ScriptContext Context { get; set; }
InvokerCache
View Source
public ConcurrentDictionary<string, MethodInvoker> InvokerCache { get; }
Pages
View Source
public ISharpPages Pages { get; set; }
Fields
Instance
View Source
public static readonly ProtectedScripts Instance
Methods
resolve(ScriptScopeContext, Object)
View Source
public object resolve(ScriptScopeContext scope, object type)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.Object | type |
default(String)
View Source
public object default(string typeName)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | typeName |
new(String)
View Source
public object new(string typeName)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | typeName |
new(String, List<Object>)
View Source
public object new(string typeName, List<object> constructorArgs)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | typeName |
System.Collections.Generic.List<System.Object> | constructorArgs |
set(Object, Dictionary<String, Object>)
View Source
public object set(object instance, Dictionary<string, object> args)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | instance |
System.Collections.Generic.Dictionary<System.String,System.Object> | args |
createInstance(Type)
View Source
public object createInstance(Type type)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
createInstance(Type, List<Object>)
View Source
public object createInstance(Type type, List<object> constructorArgs)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.Collections.Generic.List<System.Object> | constructorArgs |
getType(Object)
View Source
public Type getType(object instance)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.Object | instance |
typeQualifiedName(Type)
View Source
public string typeQualifiedName(Type type)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Type | type |
TypeNotFoundErrorMessage(String)
View Source
public static string TypeNotFoundErrorMessage(string typeName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | typeName |
assertTypeOf(String)
View Source
public Type assertTypeOf(string name)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.String | name |
typeof(String)
Returns Type from type name syntax of .NET's typeof()
View Source
public Type typeof(string typeName)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.String | typeName |
typeofProgId(String)
View Source
public Type typeofProgId(string name)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.String | name |
call(Object, String)
View Source
public object call(object instance, string name)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | instance |
System.String | name |
call(Object, String, List<Object>)
View Source
public object call(object instance, string name, List<object> args)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | instance |
System.String | name |
System.Collections.Generic.List<System.Object> | args |
Constructor(String)
Qualified Constructor Name Examples:
- Type()
- Type(string)
- GenericType<string<(System.Int32)
- Namespace.Type()
View Source
public ObjectActivator Constructor(string qualifiedConstructorName)
Returns
Parameters
Type | Name |
---|---|
System.String | qualifiedConstructorName |
C(String)
Shorter Alias for Constructor
View Source
public Delegate C(string qualifiedMethodName)
Returns
System.Delegate
Parameters
Type | Name |
---|---|
System.String | qualifiedMethodName |
F(String)
Shorter Alias for Function
View Source
public Delegate F(string qualifiedMethodName)
Returns
System.Delegate
Parameters
Type | Name |
---|---|
System.String | qualifiedMethodName |
F(String, List<Object>)
Shorter Alias for Function(name,args)
View Source
public Delegate F(string qualifiedMethodName, List<object> args)
Returns
System.Delegate
Parameters
Type | Name |
---|---|
System.String | qualifiedMethodName |
System.Collections.Generic.List<System.Object> | args |
Function(String)
Qualified Method Name Examples:
- Console.WriteLine(string)
- Type.StaticMethod
- Type.InstanceMethod
- GenericType<string<.Method
- GenericType<string<.GenericMethod<System.Int32<
- Namespace.Type.Method
View Source
public Delegate Function(string qualifiedMethodName)
Returns
System.Delegate
Parameters
Type | Name |
---|---|
System.String | qualifiedMethodName |
Function(String, List<Object>)
Resolve Function from qualified type name, when args Type list are unspecified fallback to use args to resolve ambiguous methods
Qualified Method Name Examples:
- Console.WriteLine ['string']
- Type.StaticMethod
- Type.InstanceMethod
- GenericType<string<.Method
- GenericType<string<.GenericMethod<System.Int32<
- Namespace.Type.Method
View Source
public Delegate Function(string qualifiedMethodName, List<object> args)
Returns
System.Delegate
Parameters
Type | Name |
---|---|
System.String | qualifiedMethodName |
System.Collections.Generic.List<System.Object> | args |
vfsMemory()
View Source
public MemoryVirtualFiles vfsMemory()
Returns
ServiceStack.IO.MemoryVirtualFiles
vfsFileSystem(String)
View Source
public FileSystemVirtualFiles vfsFileSystem(string dirPath)
Returns
ServiceStack.IO.FileSystemVirtualFiles
Parameters
Type | Name |
---|---|
System.String | dirPath |
vfsGist(String)
View Source
public GistVirtualFiles vfsGist(string gistId)
Returns
ServiceStack.IO.GistVirtualFiles
Parameters
Type | Name |
---|---|
System.String | gistId |
vfsGist(String, String)
View Source
public GistVirtualFiles vfsGist(string gistId, string accessToken)
Returns
ServiceStack.IO.GistVirtualFiles
Parameters
Type | Name |
---|---|
System.String | gistId |
System.String | accessToken |
osPaths(String)
View Source
public string osPaths(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
resolveFile(ScriptScopeContext, String)
View Source
public IVirtualFile resolveFile(ScriptScopeContext scope, string virtualPath)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
ResolveFile(String, ScriptScopeContext, String)
View Source
public IVirtualFile ResolveFile(string filterName, ScriptScopeContext scope, string virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.String | filterName |
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
ResolveFile(IVirtualPathProvider, String, String)
View Source
public IVirtualFile ResolveFile(IVirtualPathProvider virtualFiles, string fromVirtualPath, string virtualPath)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | virtualFiles |
System.String | fromVirtualPath |
System.String | virtualPath |
includeFile(ScriptScopeContext, String)
View Source
public async Task includeFile(ScriptScopeContext scope, string virtualPath)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
ifDebugIncludeScript(ScriptScopeContext, String)
View Source
public async Task ifDebugIncludeScript(ScriptScopeContext scope, string virtualPath)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
vfsAllFiles()
View Source
[Alias("allFiles")]
public IEnumerable<IVirtualFile> vfsAllFiles()
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
vfsAllRootFiles()
View Source
[Alias("allRootFiles")]
public IEnumerable<IVirtualFile> vfsAllRootFiles()
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
vfsAllRootDirectories()
View Source
[Alias("allRootDirectories")]
public IEnumerable<IVirtualDirectory> vfsAllRootDirectories()
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualDirectory>
vfsCombinePath(String, String)
View Source
[Alias("combinePath")]
public string vfsCombinePath(string basePath, string relativePath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | basePath |
System.String | relativePath |
dirFilesFind(String, String)
View Source
[Alias("findFilesInDirectory")]
public IEnumerable<IVirtualFile> dirFilesFind(string dirPath, string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | dirPath |
System.String | globPattern |
filesFind(String)
View Source
[Alias("findFiles")]
public IEnumerable<IVirtualFile> filesFind(string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
fileWrite(String, Object)
View Source
[Alias("writeFile")]
public string fileWrite(string virtualPath, object contents)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
System.Object | contents |
fileAppend(String, Object)
View Source
[Alias("appendToFile")]
public string fileAppend(string virtualPath, object contents)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
System.Object | contents |
fileDelete(String)
View Source
[Alias("deleteFile")]
public string fileDelete(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
dirDelete(String)
View Source
[Alias("deleteFile")]
public string dirDelete(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
fileReadAll(String)
View Source
[Alias("fileTextContents")]
public string fileReadAll(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
fileReadAllBytes(String)
View Source
[Alias("fileBytesContent")]
public byte[] fileReadAllBytes(string virtualPath)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
System.String | virtualPath |
allFiles()
View Source
public IEnumerable<IVirtualFile> allFiles()
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
allFiles(IVirtualPathProvider)
View Source
public IEnumerable<IVirtualFile> allFiles(IVirtualPathProvider vfs)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
allRootFiles()
View Source
public IEnumerable<IVirtualFile> allRootFiles()
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
allRootFiles(IVirtualPathProvider)
View Source
public IEnumerable<IVirtualFile> allRootFiles(IVirtualPathProvider vfs)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
allRootDirectories()
View Source
public IEnumerable<IVirtualDirectory> allRootDirectories()
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualDirectory>
allRootDirectories(IVirtualPathProvider)
View Source
public IEnumerable<IVirtualDirectory> allRootDirectories(IVirtualPathProvider vfs)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualDirectory>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
combinePath(String, String)
View Source
public string combinePath(string basePath, string relativePath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | basePath |
System.String | relativePath |
combinePath(IVirtualPathProvider, String, String)
View Source
public string combinePath(IVirtualPathProvider vfs, string basePath, string relativePath)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | basePath |
System.String | relativePath |
dir(String)
View Source
public IVirtualDirectory dir(string virtualPath)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | virtualPath |
dir(IVirtualPathProvider, String)
View Source
public IVirtualDirectory dir(IVirtualPathProvider vfs, string virtualPath)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
dirExists(String)
View Source
public bool dirExists(string virtualPath)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | virtualPath |
dirExists(IVirtualPathProvider, String)
View Source
public bool dirExists(IVirtualPathProvider vfs, string virtualPath)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
dirFile(String, String)
View Source
public IVirtualFile dirFile(string dirPath, string fileName)
Returns
Parameters
Type | Name |
---|---|
System.String | dirPath |
System.String | fileName |
dirFile(IVirtualPathProvider, String, String)
View Source
public IVirtualFile dirFile(IVirtualPathProvider vfs, string dirPath, string fileName)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | dirPath |
System.String | fileName |
dirFiles(String)
View Source
public IEnumerable<IVirtualFile> dirFiles(string dirPath)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | dirPath |
dirFiles(IVirtualPathProvider, String)
View Source
public IEnumerable<IVirtualFile> dirFiles(IVirtualPathProvider vfs, string dirPath)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | dirPath |
dirDirectory(String, String)
View Source
public IVirtualDirectory dirDirectory(string dirPath, string dirName)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
System.String | dirPath |
System.String | dirName |
dirDirectory(IVirtualPathProvider, String, String)
View Source
public IVirtualDirectory dirDirectory(IVirtualPathProvider vfs, string dirPath, string dirName)
Returns
ServiceStack.IO.IVirtualDirectory
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | dirPath |
System.String | dirName |
dirDirectories(String)
View Source
public IEnumerable<IVirtualDirectory> dirDirectories(string dirPath)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualDirectory>
Parameters
Type | Name |
---|---|
System.String | dirPath |
dirDirectories(IVirtualPathProvider, String)
View Source
public IEnumerable<IVirtualDirectory> dirDirectories(IVirtualPathProvider vfs, string dirPath)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualDirectory>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | dirPath |
findFilesInDirectory(String, String)
View Source
public IEnumerable<IVirtualFile> findFilesInDirectory(string dirPath, string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | dirPath |
System.String | globPattern |
findFilesInDirectory(IVirtualPathProvider, String, String)
View Source
public IEnumerable<IVirtualFile> findFilesInDirectory(IVirtualPathProvider vfs, string dirPath, string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | dirPath |
System.String | globPattern |
findFiles(String)
View Source
public IEnumerable<IVirtualFile> findFiles(string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
System.String | globPattern |
dirFindFiles(IVirtualDirectory, String)
View Source
public IEnumerable<IVirtualFile> dirFindFiles(IVirtualDirectory dir, string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualDirectory | dir |
System.String | globPattern |
dirFindFiles(IVirtualDirectory, String, Int32)
View Source
public IEnumerable<IVirtualFile> dirFindFiles(IVirtualDirectory dir, string globPattern, int maxDepth)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualDirectory | dir |
System.String | globPattern |
System.Int32 | maxDepth |
findFiles(IVirtualPathProvider, String)
View Source
public IEnumerable<IVirtualFile> findFiles(IVirtualPathProvider vfs, string globPattern)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | globPattern |
findFiles(IVirtualPathProvider, String, Int32)
View Source
public IEnumerable<IVirtualFile> findFiles(IVirtualPathProvider vfs, string globPattern, int maxDepth)
Returns
System.Collections.Generic.IEnumerable<ServiceStack.IO.IVirtualFile>
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | globPattern |
System.Int32 | maxDepth |
fileExists(String)
View Source
public bool fileExists(string virtualPath)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | virtualPath |
fileExists(IVirtualPathProvider, String)
View Source
public bool fileExists(IVirtualPathProvider vfs, string virtualPath)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
file(String)
View Source
public IVirtualFile file(string virtualPath)
Returns
Parameters
Type | Name |
---|---|
System.String | virtualPath |
file(IVirtualPathProvider, String)
View Source
public IVirtualFile file(IVirtualPathProvider vfs, string virtualPath)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
writeFile(String, Object)
View Source
public string writeFile(string virtualPath, object contents)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
System.Object | contents |
writeFile(IVirtualPathProvider, String, Object)
View Source
public string writeFile(IVirtualPathProvider vfs, string virtualPath, object contents)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
System.Object | contents |
writeFiles(IVirtualPathProvider, Dictionary<String, Object>)
View Source
public object writeFiles(IVirtualPathProvider vfs, Dictionary<string, object> files)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.Collections.Generic.Dictionary<System.String,System.Object> | files |
writeTextFiles(IVirtualPathProvider, Dictionary<String, String>)
View Source
public object writeTextFiles(IVirtualPathProvider vfs, Dictionary<string, string> textFiles)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.Collections.Generic.Dictionary<System.String,System.String> | textFiles |
appendToFile(String, Object)
View Source
public string appendToFile(string virtualPath, object contents)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
System.Object | contents |
appendToFile(IVirtualPathProvider, String, Object)
View Source
public string appendToFile(IVirtualPathProvider vfs, string virtualPath, object contents)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
System.Object | contents |
deleteFile(String)
View Source
public string deleteFile(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
deleteFile(IVirtualPathProvider, String)
View Source
public string deleteFile(IVirtualPathProvider vfs, string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
deleteDirectory(String)
View Source
public string deleteDirectory(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
deleteDirectory(IVirtualPathProvider, String)
View Source
public string deleteDirectory(IVirtualPathProvider vfs, string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
fileTextContents(String)
View Source
public string fileTextContents(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
fileTextContents(IVirtualPathProvider, String)
View Source
public string fileTextContents(IVirtualPathProvider vfs, string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
fileContents(IVirtualPathProvider, String)
View Source
public object fileContents(IVirtualPathProvider vfs, string virtualPath)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
fileContents(Object)
View Source
public object fileContents(object file)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | file |
textContents(IVirtualFile)
View Source
public string textContents(IVirtualFile file)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFile | file |
fileBytesContent(String)
View Source
public byte[] fileBytesContent(string virtualPath)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
System.String | virtualPath |
fileBytesContent(IVirtualPathProvider, String)
View Source
public byte[] fileBytesContent(IVirtualPathProvider vfs, string virtualPath)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
bytesContent(IVirtualFile)
View Source
public byte[] bytesContent(IVirtualFile file)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFile | file |
fileHash(String)
View Source
public string fileHash(string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | virtualPath |
fileHash(IVirtualPathProvider, String)
View Source
public string fileHash(IVirtualPathProvider vfs, string virtualPath)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualPathProvider | vfs |
System.String | virtualPath |
fileHash(IVirtualFile)
View Source
public string fileHash(IVirtualFile file)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFile | file |
fileIsBinary(IVirtualFile)
View Source
public bool fileIsBinary(IVirtualFile file)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFile | file |
fileContentType(IVirtualFile)
View Source
public string fileContentType(IVirtualFile file)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.IO.IVirtualFile | file |
urlContents(ScriptScopeContext, String)
View Source
public Task urlContents(ScriptScopeContext scope, string url)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
urlContents(ScriptScopeContext, String, Object)
View Source
public Task urlContents(ScriptScopeContext scope, string url, object options)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
System.Object | options |
includeUrl(ScriptScopeContext, String)
View Source
public Task includeUrl(ScriptScopeContext scope, string url)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
includeUrl(ScriptScopeContext, String, Object)
View Source
public async Task includeUrl(ScriptScopeContext scope, string url, object options)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
System.Object | options |
urlTextContents(ScriptScopeContext, String)
View Source
public string urlTextContents(ScriptScopeContext scope, string url)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
urlTextContents(ScriptScopeContext, String, Object)
View Source
public string urlTextContents(ScriptScopeContext scope, string url, object options)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
System.Object | options |
urlBytesContents(ScriptScopeContext, String, Object)
View Source
public ReadOnlyMemory<byte> urlBytesContents(ScriptScopeContext scope, string url, object options)
Returns
ReadOnlyMemory<System.Byte>
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
System.Object | options |
CreateCacheKey(String, Dictionary<String, Object>)
View Source
public static string CreateCacheKey(string url, Dictionary<string, object> options = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | url |
System.Collections.Generic.Dictionary<System.String,System.Object> | options |
fileContentsWithCache(ScriptScopeContext, String)
View Source
public Task fileContentsWithCache(ScriptScopeContext scope, string virtualPath)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
fileContentsWithCache(ScriptScopeContext, String, Object)
View Source
public Task fileContentsWithCache(ScriptScopeContext scope, string virtualPath, object options)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
System.Object | options |
includeFileWithCache(ScriptScopeContext, String)
View Source
public Task includeFileWithCache(ScriptScopeContext scope, string virtualPath)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
includeFileWithCache(ScriptScopeContext, String, Object)
View Source
public async Task includeFileWithCache(ScriptScopeContext scope, string virtualPath, object options)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | virtualPath |
System.Object | options |
urlContentsWithCache(ScriptScopeContext, String)
View Source
public Task urlContentsWithCache(ScriptScopeContext scope, string url)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
urlContentsWithCache(ScriptScopeContext, String, Object)
View Source
public Task urlContentsWithCache(ScriptScopeContext scope, string url, object options)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
System.Object | options |
includeUrlWithCache(ScriptScopeContext, String)
View Source
public Task includeUrlWithCache(ScriptScopeContext scope, string url)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
includeUrlWithCache(ScriptScopeContext, String, Object)
View Source
public async Task includeUrlWithCache(ScriptScopeContext scope, string url, object options)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | url |
System.Object | options |
scriptMethods(ScriptScopeContext)
View Source
public List<ScriptMethodInfo> scriptMethods(ScriptScopeContext scope)
Returns
System.Collections.Generic.List<ServiceStack.Script.ScriptMethodInfo>
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
scriptMethodNames(ScriptScopeContext)
View Source
public List<string> scriptMethodNames(ScriptScopeContext scope)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
scriptMethodSignatures(ScriptScopeContext)
View Source
public List<string> scriptMethodSignatures(ScriptScopeContext scope)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
methods(Object)
View Source
public List<string> methods(object o)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
System.Object | o |
methodTypes(Object)
View Source
public ScriptMethodInfo[] methodTypes(object o)
Returns
ServiceStack.Script.ScriptMethodInfo[]
Parameters
Type | Name |
---|---|
System.Object | o |
staticMethods(Object)
View Source
public List<string> staticMethods(object o)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
System.Object | o |
staticMethodTypes(Object)
View Source
public ScriptMethodInfo[] staticMethodTypes(object o)
Returns
ServiceStack.Script.ScriptMethodInfo[]
Parameters
Type | Name |
---|---|
System.Object | o |
allMethodTypes(Object)
View Source
public ScriptMethodInfo[] allMethodTypes(object o)
Returns
ServiceStack.Script.ScriptMethodInfo[]
Parameters
Type | Name |
---|---|
System.Object | o |
allMemberInfos(Object)
View Source
public MemberInfo[] allMemberInfos(object o)
Returns
System.Reflection.MemberInfo[]
Parameters
Type | Name |
---|---|
System.Object | o |
cacheClear(ScriptScopeContext, Object)
View Source
public object cacheClear(ScriptScopeContext scope, object cacheNames)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.Object | cacheNames |
invalidateAllCaches(ScriptScopeContext)
View Source
public object invalidateAllCaches(ScriptScopeContext scope)
Returns
System.Object
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
sh(ScriptScopeContext, String)
View Source
public string sh(ScriptScopeContext scope, string arguments)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | arguments |
sh(ScriptScopeContext, String, Dictionary<String, Object>)
View Source
public string sh(ScriptScopeContext scope, string arguments, Dictionary<string, object> options)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | arguments |
System.Collections.Generic.Dictionary<System.String,System.Object> | options |
proc(ScriptScopeContext, String)
View Source
public string proc(ScriptScopeContext scope, string fileName)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | fileName |
proc(ScriptScopeContext, String, Dictionary<String, Object>)
View Source
public string proc(ScriptScopeContext scope, string fileName, Dictionary<string, object> options)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | fileName |
System.Collections.Generic.Dictionary<System.String,System.Object> | options |
exePath(String)
View Source
public string exePath(string exeName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | exeName |
exit(Int32)
View Source
public StopExecution exit(int exitCode)
Returns
ServiceStack.Script.StopExecution
Parameters
Type | Name |
---|---|
System.Int32 | exitCode |
inspectVars(Object)
View Source
public IgnoreResult inspectVars(object vars)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.Object | vars |
mv(ScriptScopeContext, String, String)
View Source
public string mv(ScriptScopeContext scope, string from, string to)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | from |
System.String | to |
cp(ScriptScopeContext, String, String)
View Source
public string cp(ScriptScopeContext scope, string from, string to)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | from |
System.String | to |
xcopy(ScriptScopeContext, String, String)
View Source
public string xcopy(ScriptScopeContext scope, string from, string to)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | from |
System.String | to |
rm(ScriptScopeContext, String, String)
View Source
public string rm(ScriptScopeContext scope, string from, string to)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | from |
System.String | to |
rmdir(ScriptScopeContext, String)
View Source
public string rmdir(ScriptScopeContext scope, string target)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | target |
mkdir(ScriptScopeContext, String)
View Source
public string mkdir(ScriptScopeContext scope, string target)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | target |
cat(ScriptScopeContext, String)
View Source
public string cat(ScriptScopeContext scope, string target)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | target |
touch(ScriptScopeContext, String)
View Source
public string touch(ScriptScopeContext scope, string target)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.ScriptScopeContext | scope |
System.String | target |
File()
View Source
public FileScripts File()
Returns
ServiceStack.Script.FileScripts
Directory()
View Source
public DirectoryScripts Directory()
Returns
ServiceStack.Script.DirectoryScripts
sha1(Object)
View Source
public string sha1(object target)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | target |
sha256(Object)
View Source
public string sha256(object target)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | target |
sha512(Object)
View Source
public string sha512(object target)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Object | target |
Delete(String)
View Source
public IgnoreResult Delete(string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
Delete(IOScript, String)
View Source
public IgnoreResult Delete(IOScript os, string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.IOScript | os |
System.String | path |
Exists(String)
View Source
public bool Exists(string path)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | path |
Exists(IOScript, String)
View Source
public bool Exists(IOScript os, string path)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Script.IOScript | os |
System.String | path |
Move(String, String)
View Source
public IgnoreResult Move(string from, string to)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | from |
System.String | to |
Move(IOScript, String, String)
View Source
public IgnoreResult Move(IOScript os, string from, string to)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.IOScript | os |
System.String | from |
System.String | to |
Copy(String, String)
View Source
public IgnoreResult Copy(string from, string to)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | from |
System.String | to |
Copy(IOScript, String, String)
View Source
public IgnoreResult Copy(IOScript os, string from, string to)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.IOScript | os |
System.String | from |
System.String | to |
Create(String, String)
View Source
public IgnoreResult Create(string from, string to)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | from |
System.String | to |
Create(FileScripts, String, String)
View Source
public IgnoreResult Create(FileScripts fs, string from, string to)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | from |
System.String | to |
Decrypt(String)
View Source
public IgnoreResult Decrypt(string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
Decrypt(FileScripts, String)
View Source
public IgnoreResult Decrypt(FileScripts fs, string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
Encrypt(String)
View Source
public IgnoreResult Encrypt(string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
Encrypt(FileScripts, String)
View Source
public IgnoreResult Encrypt(FileScripts fs, string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
Replace(String, String, String)
View Source
public IgnoreResult Replace(string from, string to, string backup)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | from |
System.String | to |
System.String | backup |
Replace(FileScripts, String, String, String)
View Source
public IgnoreResult Replace(FileScripts fs, string from, string to, string backup)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | from |
System.String | to |
System.String | backup |
ReadAllBytes(String)
View Source
public byte[] ReadAllBytes(string path)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
System.String | path |
ReadAllBytes(FileScripts, String)
View Source
public byte[] ReadAllBytes(FileScripts fs, string path)
Returns
System.Byte[]
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
ReadAllLines(String)
View Source
public string[] ReadAllLines(string path)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | path |
ReadAllLines(FileScripts, String)
View Source
public string[] ReadAllLines(FileScripts fs, string path)
Returns
System.String[]
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
ReadAllText(String)
View Source
public string ReadAllText(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
ReadAllText(FileScripts, String)
View Source
public string ReadAllText(FileScripts fs, string path)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
WriteAllBytes(String, Byte[])
View Source
public IgnoreResult WriteAllBytes(string path, byte[] bytes)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
System.Byte[] | bytes |
WriteAllBytes(FileScripts, String, Byte[])
View Source
public IgnoreResult WriteAllBytes(FileScripts fs, string path, byte[] bytes)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
System.Byte[] | bytes |
WriteAllLines(String, String[])
View Source
public IgnoreResult WriteAllLines(string path, string[] lines)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
System.String[] | lines |
WriteAllLines(FileScripts, String, String[])
View Source
public IgnoreResult WriteAllLines(FileScripts fs, string path, string[] lines)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
System.String[] | lines |
WriteAllText(String, String)
View Source
public IgnoreResult WriteAllText(string path, string text)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
System.String | text |
WriteAllText(FileScripts, String, String)
View Source
public IgnoreResult WriteAllText(FileScripts fs, string path, string text)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
System.String | text |
AppendAllLines(String, String[])
View Source
public IgnoreResult AppendAllLines(string path, string[] lines)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
System.String[] | lines |
AppendAllLines(FileScripts, String, String[])
View Source
public IgnoreResult AppendAllLines(FileScripts fs, string path, string[] lines)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
System.String[] | lines |
AppendAllText(String, String)
View Source
public IgnoreResult AppendAllText(string path, string text)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
System.String | text |
AppendAllText(FileScripts, String, String)
View Source
public IgnoreResult AppendAllText(FileScripts fs, string path, string text)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.FileScripts | fs |
System.String | path |
System.String | text |
CreateDirectory(String)
View Source
public IgnoreResult CreateDirectory(string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
System.String | path |
CreateDirectory(DirectoryScripts, String)
View Source
public IgnoreResult CreateDirectory(DirectoryScripts ds, string path)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|---|
ServiceStack.Script.DirectoryScripts | ds |
System.String | path |
GetDirectories(String)
View Source
public string[] GetDirectories(string path)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | path |
GetDirectories(DirectoryScripts, String)
View Source
public string[] GetDirectories(DirectoryScripts ds, string path)
Returns
System.String[]
Parameters
Type | Name |
---|---|
ServiceStack.Script.DirectoryScripts | ds |
System.String | path |
GetFiles(String)
View Source
public string[] GetFiles(string path)
Returns
System.String[]
Parameters
Type | Name |
---|---|
System.String | path |
GetFiles(DirectoryScripts, String)
View Source
public string[] GetFiles(DirectoryScripts ds, string path)
Returns
System.String[]
Parameters
Type | Name |
---|---|
ServiceStack.Script.DirectoryScripts | ds |
System.String | path |
GetLogicalDrives()
View Source
public string[] GetLogicalDrives()
Returns
System.String[]
GetLogicalDrives(DirectoryScripts)
View Source
public string[] GetLogicalDrives(DirectoryScripts ds)
Returns
System.String[]
Parameters
Type | Name |
---|---|
ServiceStack.Script.DirectoryScripts | ds |
GetCurrentDirectory()
View Source
public string GetCurrentDirectory()
Returns
System.String
GetCurrentDirectory(DirectoryScripts)
View Source
public string GetCurrentDirectory(DirectoryScripts ds)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.DirectoryScripts | ds |
GetDirectoryRoot(String)
View Source
public string GetDirectoryRoot(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
GetDirectoryRoot(DirectoryScripts, String)
View Source
public string GetDirectoryRoot(DirectoryScripts ds, string path)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Script.DirectoryScripts | ds |
System.String | path |
Inherited Methods
GetInvoker(String, Int32, InvokerType)
View Source
public MethodInvoker GetInvoker(string name, int argsCount, InvokerType type)
Returns
Parameters
Type | Name |
---|---|
System.String | name |
System.Int32 | argsCount |
ServiceStack.Script.InvokerType | type |
QueryFilters(String)
View Source
public List<MethodInfo> QueryFilters(string filterName)
Returns
System.Collections.Generic.List<System.Reflection.MethodInfo>
Parameters
Type | Name |
---|---|
System.String | filterName |