ServiceStackScripts
Assembly: ServiceStack.dll
Declaration
public class ServiceStackScripts : ScriptMethods, IConfigureScriptContext
Properties
RemoveNewLinesFor
Declaration
public static List<string> RemoveNewLinesFor { get; }
Inherited Properties
Context
Declaration
public ScriptContext Context { get; set; }
InvokerCache
Declaration
public ConcurrentDictionary<string, MethodInvoker> InvokerCache { get; }
Pages
Declaration
public ISharpPages Pages { get; set; }
Fields
Log
Methods
Configure(ScriptContext)
Declaration
public void Configure(ScriptContext context)
Parameters
vfsContent()
Declaration
public IVirtualFiles vfsContent()
Returns
ServiceStack.IO.IVirtualFiles
hostVfsMemory()
Declaration
public MemoryVirtualFiles hostVfsMemory()
Returns
ServiceStack.IO.MemoryVirtualFiles
hostVfsFileSystem()
Declaration
public FileSystemVirtualFiles hostVfsFileSystem()
Returns
ServiceStack.IO.FileSystemVirtualFiles
hostVfsGist()
Declaration
public GistVirtualFiles hostVfsGist()
Returns
ServiceStack.IO.GistVirtualFiles
httpRequest(ScriptScopeContext)
Declaration
public IHttpRequest httpRequest(ScriptScopeContext scope)
Returns
ServiceStack.Web.IHttpRequest
Parameters
requestItem(ScriptScopeContext, String)
Declaration
public object requestItem(ScriptScopeContext scope, string key)
Returns
System.Object
Parameters
baseUrl(ScriptScopeContext)
Declaration
public object baseUrl(ScriptScopeContext scope)
Returns
System.Object
Parameters
resolveUrl(ScriptScopeContext, String)
Declaration
public object resolveUrl(ScriptScopeContext scope, string virtualPath)
Returns
System.Object
Parameters
serviceUrl(ScriptScopeContext, String)
Declaration
public string serviceUrl(ScriptScopeContext scope, string requestName)
Returns
System.String
Parameters
serviceUrl(ScriptScopeContext, String, Dictionary<String, Object>)
Declaration
public string serviceUrl(ScriptScopeContext scope, string requestName, Dictionary<string, object> properties)
Returns
System.String
Parameters
serviceUrl(ScriptScopeContext, String, Dictionary<String, Object>, String)
Declaration
public string serviceUrl(ScriptScopeContext scope, string requestName, Dictionary<string, object> properties, string httpMethod)
Returns
System.String
Parameters
execService(ScriptScopeContext, String)
Declaration
public object execService(ScriptScopeContext scope, string requestName)
Returns
System.Object
Parameters
execService(ScriptScopeContext, String, Object)
Declaration
public object execService(ScriptScopeContext scope, string requestName, object options)
Returns
System.Object
Parameters
sendToGateway(ScriptScopeContext, String)
Declaration
public object sendToGateway(ScriptScopeContext scope, string requestName)
Returns
System.Object
Parameters
sendToGateway(ScriptScopeContext, Object, String)
Declaration
public object sendToGateway(ScriptScopeContext scope, object dto, string requestName)
Returns
System.Object
Parameters
sendToGateway(ScriptScopeContext, Object, String, Object)
Declaration
public object sendToGateway(ScriptScopeContext scope, object dto, string requestName, object options)
Returns
System.Object
Parameters
publishToGateway(ScriptScopeContext, String)
Declaration
public object publishToGateway(ScriptScopeContext scope, string requestName)
Returns
System.Object
Parameters
publishToGateway(ScriptScopeContext, Object, String)
Declaration
public object publishToGateway(ScriptScopeContext scope, object dto, string requestName)
Returns
System.Object
Parameters
publishToGateway(ScriptScopeContext, Object, String, Object)
Declaration
public object publishToGateway(ScriptScopeContext scope, object dto, string requestName, object options)
Returns
System.Object
Parameters
publishMessage(ScriptScopeContext, String, Object)
Declaration
public IgnoreResult publishMessage(ScriptScopeContext scope, string requestName, object dto)
Returns
ServiceStack.Script.IgnoreResult
Parameters
publishMessage(ScriptScopeContext, String, Object, Object)
Declaration
public IgnoreResult publishMessage(ScriptScopeContext scope, string requestName, object dto, object options)
Returns
ServiceStack.Script.IgnoreResult
Parameters
sendToAutoQuery(ScriptScopeContext, String)
Declaration
public object sendToAutoQuery(ScriptScopeContext scope, string requestName)
Returns
System.Object
Parameters
sendToAutoQuery(ScriptScopeContext, Object, String)
Declaration
public object sendToAutoQuery(ScriptScopeContext scope, object dto, string requestName)
Returns
System.Object
Parameters
sendToAutoQuery(ScriptScopeContext, Object, String, Object)
Declaration
public object sendToAutoQuery(ScriptScopeContext scope, object dto, string requestName, object options)
Returns
System.Object
Parameters
toResults(Object)
Declaration
public object toResults(object dto)
Returns
System.Object
Parameters
getUserSession(ScriptScopeContext)
Declaration
public object getUserSession(ScriptScopeContext scope)
Returns
System.Object
Parameters
userSession(ScriptScopeContext)
Declaration
public IAuthSession userSession(ScriptScopeContext scope)
Returns
ServiceStack.Auth.IAuthSession
Parameters
sessionIfAuthenticated(ScriptScopeContext)
Declaration
public IAuthSession sessionIfAuthenticated(ScriptScopeContext scope)
Returns
ServiceStack.Auth.IAuthSession
Parameters
userAuthId(ScriptScopeContext)
Declaration
public string userAuthId(ScriptScopeContext scope)
Returns
System.String
Parameters
userAuthName(ScriptScopeContext)
Declaration
public string userAuthName(ScriptScopeContext scope)
Returns
System.String
Parameters
userProfileUrl(ScriptScopeContext)
Declaration
public string userProfileUrl(ScriptScopeContext scope)
Returns
System.String
Parameters
userAttributes(ScriptScopeContext)
Declaration
public HashSet<string> userAttributes(ScriptScopeContext scope)
Returns
System.Collections.Generic.HashSet<System.String>
Parameters
isAuthenticated(ScriptScopeContext)
Declaration
public bool isAuthenticated(ScriptScopeContext scope)
Returns
System.Boolean
Parameters
isAuthenticated(ScriptScopeContext, String)
Declaration
public bool isAuthenticated(ScriptScopeContext scope, string provider)
Returns
System.Boolean
Parameters
redirectTo(ScriptScopeContext, String)
Declaration
public object redirectTo(ScriptScopeContext scope, string path)
Returns
System.Object
Parameters
redirectIfNotAuthenticated(ScriptScopeContext)
Declaration
public object redirectIfNotAuthenticated(ScriptScopeContext scope)
Returns
System.Object
Parameters
redirectIfNotAuthenticated(ScriptScopeContext, String)
Declaration
public object redirectIfNotAuthenticated(ScriptScopeContext scope, string path)
Returns
System.Object
Parameters
hasRole(ScriptScopeContext, String)
Declaration
public object hasRole(ScriptScopeContext scope, string role)
Returns
System.Object
Parameters
hasPermission(ScriptScopeContext, String)
Declaration
public object hasPermission(ScriptScopeContext scope, string permission)
Returns
System.Object
Parameters
assertRole(ScriptScopeContext, String)
Declaration
public object assertRole(ScriptScopeContext scope, string role)
Returns
System.Object
Parameters
assertRole(ScriptScopeContext, String, Dictionary<String, Object>)
Declaration
public object assertRole(ScriptScopeContext scope, string role, Dictionary<string, object> options)
Returns
System.Object
Parameters
assertPermission(ScriptScopeContext, String)
Declaration
public object assertPermission(ScriptScopeContext scope, string permission)
Returns
System.Object
Parameters
assertPermission(ScriptScopeContext, String, Dictionary<String, Object>)
Declaration
public object assertPermission(ScriptScopeContext scope, string permission, Dictionary<string, object> options)
Returns
System.Object
Parameters
ifAuthenticated(ScriptScopeContext)
Declaration
public object ifAuthenticated(ScriptScopeContext scope)
Returns
System.Object
Parameters
ifNotAuthenticated(ScriptScopeContext)
Declaration
public object ifNotAuthenticated(ScriptScopeContext scope)
Returns
System.Object
Parameters
onlyIfAuthenticated(ScriptScopeContext, Object)
Declaration
public object onlyIfAuthenticated(ScriptScopeContext scope, object value)
Returns
System.Object
Parameters
endIfAuthenticated(ScriptScopeContext, Object)
Declaration
public object endIfAuthenticated(ScriptScopeContext scope, object value)
Returns
System.Object
Parameters
authRepo(ScriptScopeContext)
Declaration
public IAuthRepository authRepo(ScriptScopeContext scope)
Returns
ServiceStack.Auth.IAuthRepository
Parameters
newUserAuth(IAuthRepository)
Declaration
public IUserAuth newUserAuth(IAuthRepository authRepo)
Returns
ServiceStack.Auth.IUserAuth
Parameters
newUserAuthDetails(IAuthRepository)
Declaration
public IUserAuthDetails newUserAuthDetails(IAuthRepository authRepo)
Returns
ServiceStack.Auth.IUserAuthDetails
Parameters
getUserAuth(IAuthRepository, String)
Declaration
public IUserAuth getUserAuth(IAuthRepository authRepo, string userAuthId)
Returns
ServiceStack.Auth.IUserAuth
Parameters
getUserAuthByUserName(IAuthRepository, String)
Declaration
public IUserAuth getUserAuthByUserName(IAuthRepository authRepo, string userNameOrEmail)
Returns
ServiceStack.Auth.IUserAuth
Parameters
tryAuthenticate(ScriptScopeContext, IAuthRepository, String, String)
Declaration
public IUserAuth tryAuthenticate(ScriptScopeContext scope, IAuthRepository authRepo, string userName, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
createUserAuth(IAuthRepository, IUserAuth, String)
Declaration
public IUserAuth createUserAuth(IAuthRepository authRepo, IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
saveUserAuth(IAuthRepository, IUserAuth)
Declaration
public IgnoreResult saveUserAuth(IAuthRepository authRepo, IUserAuth userAuth)
Returns
ServiceStack.Script.IgnoreResult
Parameters
updateUserAuth(IAuthRepository, IUserAuth, IUserAuth)
Declaration
public IUserAuth updateUserAuth(IAuthRepository authRepo, IUserAuth existingUser, IUserAuth newUser)
Returns
ServiceStack.Auth.IUserAuth
Parameters
updateUserAuth(IAuthRepository, IUserAuth, IUserAuth, String)
Declaration
public IgnoreResult updateUserAuth(IAuthRepository authRepo, IUserAuth existingUser, IUserAuth newUser, string password)
Returns
ServiceStack.Script.IgnoreResult
Parameters
deleteUserAuth(IAuthRepository, String)
Declaration
public IgnoreResult deleteUserAuth(IAuthRepository authRepo, string userAuthId)
Returns
ServiceStack.Script.IgnoreResult
Parameters
getUserAuths(IAuthRepository)
Declaration
public List<IUserAuth> getUserAuths(IAuthRepository authRepo)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
getUserAuths(IAuthRepository, Dictionary<String, Object>)
Declaration
public List<IUserAuth> getUserAuths(IAuthRepository authRepo, Dictionary<string, object> options)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
searchUserAuths(IAuthRepository, Dictionary<String, Object>)
Declaration
public List<IUserAuth> searchUserAuths(IAuthRepository authRepo, Dictionary<string, object> options)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
getHttpResult(ScriptScopeContext, Object)
Declaration
public IHttpResult getHttpResult(ScriptScopeContext scope, object options)
Returns
ServiceStack.Web.IHttpResult
Parameters
httpResult(ScriptScopeContext, Object)
Declaration
public HttpResult httpResult(ScriptScopeContext scope, object options)
Returns
ServiceStack.HttpResult
Parameters
ToHttpResult(Dictionary<String, Object>)
Declaration
public static HttpResult ToHttpResult(Dictionary<string, object> args)
Returns
ServiceStack.HttpResult
Parameters
Type | Name |
---|
System.Collections.Generic.Dictionary<System.String,System.Object> | args |
hasErrorStatus(ScriptScopeContext)
Declaration
public bool hasErrorStatus(ScriptScopeContext scope)
Returns
System.Boolean
Parameters
getErrorStatus(ScriptScopeContext)
Declaration
public ResponseStatus getErrorStatus(ScriptScopeContext scope)
Returns
ServiceStack.ResponseStatus
Parameters
formValue(ScriptScopeContext, String)
Only return form input value if form submission was invalid
Declaration
public string formValue(ScriptScopeContext scope, string name)
Returns
System.String
Parameters
formValue(ScriptScopeContext, String, String)
Declaration
public string formValue(ScriptScopeContext scope, string name, string defaultValue)
Returns
System.String
Parameters
formValues(ScriptScopeContext, String)
Declaration
public string[] formValues(ScriptScopeContext scope, string name)
Returns
System.String[]
Parameters
formCheckValue(ScriptScopeContext, String)
Declaration
public bool formCheckValue(ScriptScopeContext scope, string name)
Returns
System.Boolean
Parameters
errorResponseSummary(ScriptScopeContext)
Declaration
public string errorResponseSummary(ScriptScopeContext scope)
Returns
System.String
Parameters
errorResponseSummary(ScriptScopeContext, ResponseStatus)
Declaration
public string errorResponseSummary(ScriptScopeContext scope, ResponseStatus errorStatus)
Returns
System.String
Parameters
errorResponseExcept(ScriptScopeContext, IEnumerable)
Declaration
public string errorResponseExcept(ScriptScopeContext scope, IEnumerable fields)
Returns
System.String
Parameters
errorResponseExcept(ScriptScopeContext, ResponseStatus, IEnumerable)
Declaration
public string errorResponseExcept(ScriptScopeContext scope, ResponseStatus errorStatus, IEnumerable fields)
Returns
System.String
Parameters
errorResponse(ScriptScopeContext)
Declaration
public string errorResponse(ScriptScopeContext scope)
Returns
System.String
Parameters
errorResponse(ScriptScopeContext, String)
Declaration
public string errorResponse(ScriptScopeContext scope, string fieldName)
Returns
System.String
Parameters
errorResponse(ScriptScopeContext, ResponseStatus, String)
Declaration
public string errorResponse(ScriptScopeContext scope, ResponseStatus errorStatus, string fieldName)
Returns
System.String
Parameters
bundleJs(Object)
Declaration
public IRawString bundleJs(object virtualPaths)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.Object | virtualPaths |
bundleJs(Object, Object)
Declaration
public IRawString bundleJs(object virtualPaths, object options)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.Object | virtualPaths |
System.Object | options |
bundleCss(Object)
Declaration
public IRawString bundleCss(object virtualPaths)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.Object | virtualPaths |
bundleCss(Object, Object)
Declaration
public IRawString bundleCss(object virtualPaths, object options)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.Object | virtualPaths |
System.Object | options |
bundleHtml(Object)
Declaration
public IRawString bundleHtml(object virtualPaths)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.Object | virtualPaths |
bundleHtml(Object, Object)
Declaration
public IRawString bundleHtml(object virtualPaths, object options)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.Object | virtualPaths |
System.Object | options |
serviceStackLogoSvg(String)
Declaration
public IRawString serviceStackLogoSvg(string color)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | color |
serviceStackLogoSvg()
Declaration
public IRawString serviceStackLogoSvg()
Returns
ServiceStack.IRawString
serviceStackLogoDataUri(String)
Declaration
public IRawString serviceStackLogoDataUri(string color)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | color |
serviceStackLogoDataUri()
Declaration
public IRawString serviceStackLogoDataUri()
Returns
ServiceStack.IRawString
serviceStackLogoDataUriLight()
Declaration
public IRawString serviceStackLogoDataUriLight()
Returns
ServiceStack.IRawString
svgImage(String)
Declaration
public IRawString svgImage(string name)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | name |
svgImage(String, String)
Declaration
public IRawString svgImage(string name, string fillColor)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | name |
System.String | fillColor |
svgDataUri(String)
Declaration
public IRawString svgDataUri(string name)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | name |
svgDataUri(String, String)
Declaration
public IRawString svgDataUri(string name, string fillColor)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | name |
System.String | fillColor |
svgBackgroundImageCss(String)
Declaration
public IRawString svgBackgroundImageCss(string name)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | name |
svgBackgroundImageCss(String, String)
Declaration
public IRawString svgBackgroundImageCss(string name, string fillColor)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | name |
System.String | fillColor |
svgInBackgroundImageCss(String)
Declaration
public IRawString svgInBackgroundImageCss(string svg)
Returns
ServiceStack.IRawString
Parameters
svgFill(String, String)
Declaration
public IRawString svgFill(string svg, string color)
Returns
ServiceStack.IRawString
Parameters
Type | Name |
---|
System.String | svg |
System.String | color |
svgBaseUrl(ScriptScopeContext)
Declaration
public string svgBaseUrl(ScriptScopeContext scope)
Returns
System.String
Parameters
svgImages()
Declaration
public Dictionary<string, string> svgImages()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
svgDataUris()
Declaration
public Dictionary<string, string> svgDataUris()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
svgCssFiles()
Declaration
public Dictionary<string, List<string>> svgCssFiles()
Returns
System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>
svgAdd(String, String)
Declaration
public IgnoreResult svgAdd(string svg, string name)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|
System.String | svg |
System.String | name |
svgAdd(String, String, String)
Declaration
public IgnoreResult svgAdd(string svg, string name, string cssFile)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Type | Name |
---|
System.String | svg |
System.String | name |
System.String | cssFile |
svgAddFile(ScriptScopeContext, String, String)
Declaration
public IgnoreResult svgAddFile(ScriptScopeContext scope, string svgPath, string name)
Returns
ServiceStack.Script.IgnoreResult
Parameters
svgAddFile(ScriptScopeContext, String, String, String)
Declaration
public IgnoreResult svgAddFile(ScriptScopeContext scope, string svgPath, string name, string cssFile)
Returns
ServiceStack.Script.IgnoreResult
Parameters
Inherited Methods
GetInvoker(String, Int32, InvokerType)
Declaration
public MethodInvoker GetInvoker(string name, int argsCount, InvokerType type)
Returns
ServiceStack.MethodInvoker
Parameters
Declaration
public List<MethodInfo> QueryFilters(string filterName)
Returns
System.Collections.Generic.List<System.Reflection.MethodInfo>
Parameters
Type | Name |
---|
System.String | filterName |
Implements