API Diff between 1.0.0-beta-001 and 0.6.0
607 Additions
139 Removals
Scriban
-
public class LiquidTemplateContext : TemplateContext
-
public class Template
- public ScriptPage Page { get; }
- public ScriptPage Page { get; }
- public static Template Parse(string text, string sourceFilePath = null, ParserOptions parserOptions = null, LexerOptions lexerOptions = default)
- public void Render(TemplateContext context)
- public static object Evaluate(string expression, TemplateContext context)
- public static object Evaluate(string expression, object model)
- public static Template Parse(string text, string sourceFilePath = null, ParserOptions? parserOptions = default, LexerOptions? lexerOptions = default)
- public static Template ParseLiquid(string text, string sourceFilePath = null, ParserOptions? parserOptions = default, LexerOptions? lexerOptions = default)
- public object Evaluate(TemplateContext context)
- public object Evaluate(object model = null)
- public string Render(TemplateContext context)
- public string ToText(TemplateRewriterOptions options = default)
-
public class TemplateContext
- public sealed delegate TryGetVariableDelegate : MulticastDelegate
- public CultureInfo CurrentCulture { get; }
- public bool EnableBreakAndContinueAsReturnOutsideLoop { get; set; }
- public bool EnableRelaxedMemberAccess { get; set; }
- public IMemberRenamer MemberRenamer { get; set; }
- public StringBuilder Output { get; }
- public MemberFilterDelegate MemberFilter { get; set; }
- public MemberRenamerDelegate MemberRenamer { get; set; }
- public IScriptOutput Output { get; }
- public object Result { get; set; }
- public TimeSpan RegexTimeOut { get; set; }
- public bool StrictVariables { get; set; }
- public Dictionary<object, object> TagsCurrentLocal { get; }
- public Dictionary<object, object> TagsCurrentLoop { get; }
- public Func<ScriptVariable, object> TryGetVariable { get; set; }
- public TryGetVariableDelegate TryGetVariable { get; set; }
- public object Evaluate(ScriptNode scriptNode)
- public object Evaluate(ScriptNode scriptNode, bool aliasReturnedFunction)
- public void EnterRecursive(ScriptNode node)
- public object Evaluate(ScriptNode scriptNode)
- public object Evaluate(ScriptNode scriptNode, bool aliasReturnedFunction)
- protected virtual object EvaluateImpl(ScriptNode scriptNode)
- public void ExitRecursive(ScriptNode node)
- public IListAccessor GetListAccessor(object target)
- protected virtual IListAccessor GetListAccessorImpl(object target, Type type)
- public object GetValue(ScriptExpression target)
- public object GetValue(ScriptExpression target)
- public object GetValue(ScriptVariable variable)
- public object GetValue(ScriptVariableGlobal variable)
- public virtual object IsEmpty(SourceSpan span, object against)
- protected virtual void OnEnterLoop(ScriptLoopStatementBase loop)
- protected virtual void OnExitLoop(ScriptLoopStatementBase loop)
- protected virtual bool OnStepLoop(ScriptLoopStatementBase loop)
- public CultureInfo PopCulture()
- public string PopOutput()
- public IScriptOutput PopOutput()
- public void PushCulture(CultureInfo culture)
- public void PushOutput(IScriptOutput output)
- public void SetReadOnly(ScriptVariable variable, bool isReadOnly = true)
- public void SetValue(ScriptVariable variable, object value, bool asReadOnly)
- public void SetValue(ScriptExpression target, object value)
- public void Write(SourceSpan span, object textAsObject)
- public void Write(string text)
- public void SetReadOnly(ScriptVariable variable, bool isReadOnly = true)
- public void SetValue(ScriptVariableLoop variable, object value)
- public void SetValue(ScriptVariable variable, object value, bool asReadOnly = false)
- public void SetValue(ScriptExpression target, object value)
- public virtual bool ToBool(object value)
- public virtual double ToDouble(SourceSpan span, object value)
- public virtual int ToInt(SourceSpan span, object value)
- public virtual IList ToList(SourceSpan span, object value)
- public virtual object ToObject(SourceSpan span, object value, Type destinationType)
- public virtual string ToString(SourceSpan span, object value)
- public TemplateContext Write(SourceSpan span, object textAsObject)
- public TemplateContext Write(string text)
- public TemplateContext Write(string text, int startIndex, int count)
- public TemplateContext WriteLine()
-
public class TemplateRewriterContext
-
public struct TemplateRewriterOptions
Scriban.Functions
-
public class ArrayFunctions : ScriptObject
- public static IList Add(object value, IList list)
- public static IList AddRange(IEnumerable iterator, IList list)
- public static IList Add(IList list, object value)
- public static IEnumerable AddRange(IEnumerable list1, IEnumerable list2)
- public static ScriptArray Compact(IEnumerable list)
- public static IEnumerable Concat(IEnumerable list1, IEnumerable list2)
- public static object Cycle(TemplateContext context, SourceSpan span, IList list, object group = null)
- public static IList InsertAt(int index, object value, IList list)
- public static string Join(string delimiter, IEnumerable enumerable)
- public static IList InsertAt(IList list, int index, object value)
- public static string Join(TemplateContext context, SourceSpan span, IEnumerable list, string delimiter)
- public static IEnumerable Map(TemplateContext context, object input, string member)
- public static IList RemoveAt(int index, IList list)
- public static ScriptArray Limit(IEnumerable list, int count)
- public static IEnumerable Map(TemplateContext context, SourceSpan span, object list, string member)
- public static ScriptArray Offset(IEnumerable list, int index)
- public static IList RemoveAt(IList list, int index)
- public static IEnumerable Sort(TemplateContext context, object input, string member = null)
- public static IEnumerable Sort(TemplateContext context, SourceSpan span, object list, string member = null)
-
public class DateTimeFunctions : ScriptObject, IScriptCustomFunction
- public static readonly ScriptVariable DateVariable
- public const string DefaultFormat = "%d %b %Y"
- public static DateTime Now { get; }
- public string Format { get; set; }
- public DateTimeFunctions()
- public static DateTime AddDays(DateTime date, double days)
- public static DateTime AddHours(DateTime date, double hours)
- public static DateTime AddMilliseconds(DateTime date, double millis)
- public static DateTime AddMinutes(DateTime date, double minutes)
- public static DateTime AddMonths(DateTime date, int months)
- public static DateTime AddSeconds(DateTime date, double seconds)
- public static DateTime AddYears(DateTime date, int years)
- public static DateTime Parse(TemplateContext context, string text)
- public object Invoke(TemplateContext context, ScriptNode callerContext, ScriptArray arguments, ScriptBlockStatement blockStatement)
- public virtual string ToString(DateTime datetime, string pattern, CultureInfo culture)
-
public class HtmlFunctions : ScriptObject
-
public sealed class IncludeFunction : IScriptCustomFunction
-
public class LiquidBuiltinsFunctions : ScriptObject
-
public class MathFunctions : ScriptObject
- public static object Abs(TemplateContext context, SourceSpan span, object value)
- public static object DividedBy(TemplateContext context, SourceSpan span, double value, object divisor)
- public static object Round(int precision, double value)
- public static string Format(TemplateContext context, SourceSpan span, object value, string format)
- public static bool IsNumber(object value)
- public static object Minus(TemplateContext context, SourceSpan span, object value, object with)
- public static object Modulo(TemplateContext context, SourceSpan span, object value, object with)
- public static object Plus(TemplateContext context, SourceSpan span, object value, object with)
- public static double Round(double value, int precision = 0)
- public static object Times(TemplateContext context, SourceSpan span, object value, object with)
-
public class ObjectFunctions : ScriptObject
- public static IEnumerable<object> Keys(IDictionary<string, object> dictionary)
- public static object Default(object value, object default)
- public static bool HasKey(IDictionary<string, object> value, string key)
- public static bool HasValue(IDictionary<string, object> value, string key)
- public static ScriptArray Keys(IDictionary<string, object> value)
- public static int Size(TemplateContext context, SourceSpan span, object value)
- public static IEnumerable<object> Values(IDictionary<string, object> dictionary)
- public static ScriptArray Values(IDictionary<string, object> value)
-
public class RegexFunctions : ScriptObject
- public static ScriptArray Match(string pattern, string input)
- public static string Replace(string pattern, string replace, string input)
- public static ScriptArray Split(string pattern, string input)
- public static ScriptArray Match(TemplateContext context, string text, string pattern, string options = null)
- public static string Replace(TemplateContext context, string text, string pattern, string replace, string options = null)
- public static ScriptArray Split(TemplateContext context, string text, string pattern, string options = null)
-
public class ScriptDateFunctions : ScriptObject
-
public class ScriptTimeSpanFunctions : ScriptObject
-
public class StringFunctions : ScriptObject
- public static string Append(string text, string with)
- public static bool Contains(string text, string value)
- public static bool EndsWith(string text, string value)
- public static string HmacSha1(string text, string secretKey)
- public static string HmacSha256(string text, string secretKey)
- public static string Pluralize(string single, string multiple, int number)
- public static string Md5(string text)
- public static string Pluralize(int number, string singular, string plural)
- public static string Prepend(string text, string by)
- public static string Sha1(string text)
- public static string Sha256(string text)
- public static int Size(string text)
- public static string Slice1(string text, int start, int length = 1)
- public static string Truncate(int length, string text)
- public static string Truncatewords(int count, string text)
- public static string Truncate(string text, int length, string ellipsis = null)
- public static string Truncatewords(string text, int count, string ellipsis = null)
-
public class TimeSpanFunctions : ScriptObject
Scriban.Model
Scriban.Parsing
Scriban.Runtime
-
public class DelegateCustomFunction : IScriptCustomFunction
- public DelegateCustomFunction(Func<TemplateContext, ScriptNode, ScriptArray, object> customFunction)
- public object Evaluate(TemplateContext context, ScriptNode callerContext, ScriptArray parameters, ScriptBlockStatement blockStatement)
- public DelegateCustomFunction(Func<TemplateContext, ScriptNode, ScriptArray, object> customFunction)
- public object Invoke(TemplateContext context, ScriptNode callerContext, ScriptArray arguments, ScriptBlockStatement blockStatement)
-
public sealed class DelegateMemberRenamer : IMemberRenamer
-
public abstract class DynamicCustomFunction : IScriptCustomFunction
-
public sealed class EmptyScriptObject : IScriptObject
-
public interface IListAccessor
- int GetLength(object target)
- object GetValue(object target, int index)
- void SetValue(object target, int index, object value)
- int GetLength(TemplateContext context, SourceSpan span, object target)
- object GetValue(TemplateContext context, SourceSpan span, object target, int index)
- void SetValue(TemplateContext context, SourceSpan span, object target, int index, object value)
-
public interface IMemberRenamer
-
public interface IObjectAccessor
- bool HasMember(object target, string member)
- bool TryGetValue(object target, string member, out object value)
- bool TrySetValue(object target, string member, object value)
- int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
-
public interface IScriptCustomFunction
-
public interface IScriptCustomType
-
public interface IScriptObject
- int Count { get; }
- object this[string key] { get; set; }
- IScriptObject Clone(bool deep)
- IEnumerable<string> GetMembers()
- void SetValue(string member, object value, bool readOnly)
- bool TryGetValue(string member, out object value)
- void SetValue(TemplateContext context, SourceSpan span, string member, object value, bool readOnly)
- bool TryGetValue(TemplateContext context, SourceSpan span, string member, out object value)
-
public interface IScriptOutput
-
public interface ITemplateLoader
-
public sealed delegate MemberFilterDelegate : MulticastDelegate
-
public sealed delegate MemberRenamerDelegate : MulticastDelegate
-
public class ScriptArray<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList, ICollection, IScriptObject
- public virtual IScriptObject Clone(bool deep)
- public IEnumerable<string> GetMembers()
- public virtual void SetValue(string member, object value, bool readOnly)
- public virtual bool TryGetValue(string member, out object value)
- public virtual void SetValue(TemplateContext context, SourceSpan span, string member, object value, bool readOnly)
- public virtual bool TryGetValue(TemplateContext context, SourceSpan span, string member, out object value)
-
public class ScriptDate : ScriptObject, IScriptCustomType, IComparable
-
public class ScriptObject : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IScriptObject, IDictionary, ICollection
- public ScriptObject(bool autoImportStaticsFromThisType)
- public ScriptObject(int capacity)
- public ScriptObject(int capacity, bool autoImportStaticsFromThisType)
- public virtual IScriptObject Clone(bool deep)
- public virtual void CopyTo(ScriptObject dest)
- public IEnumerable<string> GetMembers()
- public virtual void SetValue(TemplateContext context, SourceSpan span, string member, object value, bool readOnly)
- public virtual string ToString(SourceSpan span)
- public virtual bool TryGetValue(string member, out object value)
- public virtual string ToString(TemplateContext context, SourceSpan span)
- public virtual bool TryGetValue(TemplateContext context, SourceSpan span, string member, out object value)
-
public static class ScriptObjectExtensions
- public sealed delegate FilterMemberDelegate : MulticastDelegate
- public static void Import(this IScriptObject script, object obj)
- public static void Import(this IScriptObject script, object obj, MemberFilterDelegate filter = null, MemberRenamerDelegate renamer = null)
- public static void Import(this IScriptObject script, object obj, ScriptMemberImportFlags flags, FilterMemberDelegate filter = null, IMemberRenamer renamer = null)
- public static void Import(this IScriptObject script, object obj, ScriptMemberImportFlags flags, MemberFilterDelegate filter = null, MemberRenamerDelegate renamer = null)
- public static bool TryGetValue(this IScriptObject this, string key, out object value)
-
public class ScriptObjectReadOnlyException : Exception
-
public class ScriptSyntaxAttribute : Attribute
-
public struct ScriptTimeSpan : IScriptCustomType, IComparable
-
public static class ScriptValueConverter
-
public sealed class StandardMemberRenamer
-
public class StringBuilderOutput : IScriptOutput
-
public class TextWriterOutput : IScriptOutput
Scriban.Runtime.Accessors
-
public class ArrayAccessor : IListAccessor, IObjectAccessor
- public int GetLength(object target)
- public object GetValue(object target, int index)
- public void SetValue(object target, int index, object value)
- public int GetLength(TemplateContext context, SourceSpan span, object target)
- public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- public object GetValue(TemplateContext context, SourceSpan span, object target, int index)
- public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- public void SetValue(TemplateContext context, SourceSpan span, object target, int index, object value)
- public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
-
public sealed class DictionaryAccessor : IObjectAccessor
- public bool HasMember(object target, string member)
- public bool TryGetValue(object target, string member, out object value)
- public bool TrySetValue(object target, string member, object value)
- public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
-
public class ListAccessor : IListAccessor, IObjectAccessor
- public int GetLength(object target)
- public object GetValue(object target, int index)
- public void SetValue(object target, int index, object value)
- public int GetLength(TemplateContext context, SourceSpan span, object target)
- public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- public object GetValue(TemplateContext context, SourceSpan span, object target, int index)
- public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- public void SetValue(TemplateContext context, SourceSpan span, object target, int index, object value)
- public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
-
public class NullAccessor : IObjectAccessor
- public bool HasMember(object target, string member)
- public bool TryGetValue(object target, string member, out object value)
- public bool TrySetValue(object target, string member, object value)
- public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
-
public class ScriptObjectAccessor : IObjectAccessor
- public bool HasMember(object target, string member)
- public bool TryGetValue(object target, string member, out object value)
- public bool TrySetValue(object target, string member, object value)
- public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
-
public class TypedObjectAccessor : IObjectAccessor
- public TypedObjectAccessor(Type targetType, IMemberRenamer renamer)
- public bool HasMember(object target, string member)
- public bool TryGetValue(object target, string member, out object value)
- public bool TrySetValue(object target, string member, object value)
- public TypedObjectAccessor(Type targetType, MemberFilterDelegate filter, MemberRenamerDelegate renamer)
- public int GetMemberCount(TemplateContext context, SourceSpan span, object target)
- public IEnumerable<string> GetMembers(TemplateContext context, SourceSpan span, object target)
- public bool HasMember(TemplateContext context, SourceSpan span, object target, string member)
- public bool TryGetValue(TemplateContext context, SourceSpan span, object target, string member, out object value)
- public bool TrySetValue(TemplateContext context, SourceSpan span, object target, string member, object value)
Scriban.Syntax