Skip to main content

TemplateFilterUtils

Assembly: ServiceStack.Common.dll​
View Source​
Declaration
public static class TemplateFilterUtils

Methods​

AssertOptions(ScriptScopeContext, String, Object)​

View Source​
Declaration
public static Dictionary<string, object> AssertOptions(this ScriptScopeContext scope, string filterName, object scopedParams)
Returns​

System.Collections.Generic.Dictionary<System.String,System.Object>

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfilterName
System.ObjectscopedParams

AssertOptions(Object, String)​

View Source​
Declaration
public static Dictionary<string, object> AssertOptions(this object scopedParams, string filterName)
Returns​

System.Collections.Generic.Dictionary<System.String,System.Object>

Parameters​
TypeName
System.ObjectscopedParams
System.StringfilterName

AssertNoCircularDeps(Object)​

View Source​
Declaration
public static object AssertNoCircularDeps(this object value)
Returns​

System.Object

Parameters​
TypeName
System.Objectvalue

AssertEnumerable(Object, String)​

View Source​
Declaration
public static IEnumerable<object> AssertEnumerable(this object items, string filterName)
Returns​

System.Collections.Generic.IEnumerable<System.Object>

Parameters​
TypeName
System.Objectitems
System.StringfilterName

AssertExpression(ScriptScopeContext, String, Object)​

View Source​
Declaration
public static string AssertExpression(this ScriptScopeContext scope, string filterName, object expression)
Returns​

System.String

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfilterName
System.Objectexpression

AssertExpression(ScriptScopeContext, String, Object, Object, out String)​

View Source​
Declaration
public static JsToken AssertExpression(this ScriptScopeContext scope, string filterName, object expression, object scopeOptions, out string itemBinding)
Returns​

ServiceStack.Script.JsToken

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfilterName
System.Objectexpression
System.ObjectscopeOptions
System.StringitemBinding

GetParamsWithItemBinding(ScriptScopeContext, String, Object, out String)​

View Source​
Declaration
public static Dictionary<string, object> GetParamsWithItemBinding(this ScriptScopeContext scope, string filterName, object scopedParams, out string itemBinding)
Returns​

System.Collections.Generic.Dictionary<System.String,System.Object>

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfilterName
System.ObjectscopedParams
System.StringitemBinding

GetParamsWithItemBinding(ScriptScopeContext, String, SharpPage, Object, out String)​

View Source​
Declaration
public static Dictionary<string, object> GetParamsWithItemBinding(this ScriptScopeContext scope, string filterName, SharpPage page, object scopedParams, out string itemBinding)
Returns​

System.Collections.Generic.Dictionary<System.String,System.Object>

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfilterName
ServiceStack.Script.SharpPagepage
System.ObjectscopedParams
System.StringitemBinding

GetParamsWithItemBindingOnly(ScriptScopeContext, String, SharpPage, Object, out String)​

View Source​
Declaration
public static Dictionary<string, object> GetParamsWithItemBindingOnly(this ScriptScopeContext scope, string filterName, SharpPage page, object scopedParams, out string itemBinding)
Returns​

System.Collections.Generic.Dictionary<System.String,System.Object>

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringfilterName
ServiceStack.Script.SharpPagepage
System.ObjectscopedParams
System.StringitemBinding

AddItemToScope(ScriptScopeContext, String, Object, Int32)​

View Source​
Declaration
public static ScriptScopeContext AddItemToScope(this ScriptScopeContext scope, string itemBinding, object item, int index)
Returns​

ServiceStack.Script.ScriptScopeContext

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringitemBinding
System.Objectitem
System.Int32index

AddItemToScope(ScriptScopeContext, String, Object)​

View Source​
Declaration
public static ScriptScopeContext AddItemToScope(this ScriptScopeContext scope, string itemBinding, object item)
Returns​

ServiceStack.Script.ScriptScopeContext

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringitemBinding
System.Objectitem

GetValueOrEvaluateBinding<T>(ScriptScopeContext, Object)​

View Source​
Declaration
public static T GetValueOrEvaluateBinding<T>(this ScriptScopeContext scope, object valueOrBinding)
Returns​

<T>

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.ObjectvalueOrBinding
Type Parameters​
  • T

GetValueOrEvaluateBinding(ScriptScopeContext, Object, Type)​

View Source​
Declaration
public static object GetValueOrEvaluateBinding(this ScriptScopeContext scope, object valueOrBinding, Type returnType)
Returns​

System.Object

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.ObjectvalueOrBinding
System.TypereturnType

TryGetPage(ScriptScopeContext, String, out SharpPage, out SharpCodePage)​

View Source​
Declaration
public static bool TryGetPage(this ScriptScopeContext scope, string virtualPath, out SharpPage page, out SharpCodePage codePage)
Returns​

System.Boolean

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.StringvirtualPath
ServiceStack.Script.SharpPagepage
ServiceStack.Script.SharpCodePagecodePage

CreateNewContext(ScriptScopeContext, Dictionary<String, Object>)​

View Source​
Declaration
public static ScriptContext CreateNewContext(this ScriptScopeContext scope, Dictionary<string, object> args)
Returns​

ServiceStack.Script.ScriptContext

Parameters​
TypeName
ServiceStack.Script.ScriptScopeContextscope
System.Collections.Generic.Dictionary<System.String,System.Object>args