Template Extension

Location

  • Reference: Go.dll
  • Namespace: go.text.template
  • Extends: Template
  • Platforms: .NET, .NET Standard 2.0

Instance Methods


AddParseTree

 

method AddParseTree(name: string; tree: Reference<Tree>): tuple of (Template, error)

 

(Template, error) AddParseTree(string name, Reference<Tree> tree)

 

func AddParseTree(_ name: string, _ tree: Reference<Tree>) -> (Template, error)

 

func AddParseTree(name string, tree Reference<Tree>) (Template, error)

 

Function AddParseTree(name As string, tree As Reference<Tree>) As Tuple (Of Template, error)

Parameters:

  • name:
  • tree:

Clone

 

method Clone: tuple of (Template, error)

 

(Template, error) Clone()

 

func Clone() -> (Template, error)

 

func Clone() (Template, error)

 

Function Clone() As Tuple (Of Template, error)

DefinedTemplates

 

method DefinedTemplates: string

 

string DefinedTemplates()

 

func DefinedTemplates() -> string

 

func DefinedTemplates() string

 

Function DefinedTemplates() As string

Delims

 

method Delims(left: string; right: string): Reference<Template>

 

Reference<Template> Delims(string left, string right)

 

func Delims(_ left: string, _ right: string) -> Reference<Template>

 

func Delims(left string, right string) Reference<Template>

 

Function Delims(left As string, right As string) As Reference<Template>

Parameters:

  • left:
  • right:

Execute

 

method Execute(wr: Writer; data: Object): error

 

error Execute(Writer wr, Object data)

 

func Execute(_ wr: Writer, _ data: Object) -> error

 

func Execute(wr Writer, data interface{}) error

 

Function Execute(wr As Writer, data As Object) As error

Parameters:

  • wr:
  • data:

ExecuteTemplate

 

method ExecuteTemplate(wr: Writer; name: string; data: Object): error

 

error ExecuteTemplate(Writer wr, string name, Object data)

 

func ExecuteTemplate(_ wr: Writer, _ name: string, _ data: Object) -> error

 

func ExecuteTemplate(wr Writer, name string, data interface{}) error

 

Function ExecuteTemplate(wr As Writer, name As string, data As Object) As error

Parameters:

  • wr:
  • name:
  • data:

Funcs

 

method Funcs(funcMap: FuncMap): Reference<Template>

 

Reference<Template> Funcs(FuncMap funcMap)

 

func Funcs(_ funcMap: FuncMap) -> Reference<Template>

 

func Funcs(funcMap FuncMap) Reference<Template>

 

Function Funcs(funcMap As FuncMap) As Reference<Template>

Parameters:

  • funcMap:

Lookup

 

method Lookup(name: string): Reference<Template>

 

Reference<Template> Lookup(string name)

 

func Lookup(_ name: string) -> Reference<Template>

 

func Lookup(name string) Reference<Template>

 

Function Lookup(name As string) As Reference<Template>

Parameters:

  • name:

Name

 

method Name: string

 

string Name()

 

func Name() -> string

 

func Name() string

 

Function Name() As string

New

 

method New(name: string): Reference<Template>

 

Reference<Template> New(string name)

 

func New(_ name: string) -> Reference<Template>

 

func New(name string) Reference<Template>

 

Function New(name As string) As Reference<Template>

Parameters:

  • name:

Option

 

method Option(params opt: array of string): Reference<Template>

 

Reference<Template> Option(params string[] opt)

 

func Option(_ opt: string...) -> Reference<Template>

 

func Option(opt []string) Reference<Template>

 

Function Option(ParamArray opt As string()) As Reference<Template>

Parameters:

  • opt:

Parse

 

method Parse(text: string): tuple of (Template, error)

 

(Template, error) Parse(string text)

 

func Parse(_ text: string) -> (Template, error)

 

func Parse(text string) (Template, error)

 

Function Parse(text As string) As Tuple (Of Template, error)

Parameters:

  • text:

ParseFiles

 

method ParseFiles(params filenames: array of string): tuple of (Template, error)

 

(Template, error) ParseFiles(params string[] filenames)

 

func ParseFiles(_ filenames: string...) -> (Template, error)

 

func ParseFiles(filenames []string) (Template, error)

 

Function ParseFiles(ParamArray filenames As string()) As Tuple (Of Template, error)

Parameters:

  • filenames:

ParseGlob

 

method ParseGlob(pattern: string): tuple of (Template, error)

 

(Template, error) ParseGlob(string pattern)

 

func ParseGlob(_ pattern: string) -> (Template, error)

 

func ParseGlob(pattern string) (Template, error)

 

Function ParseGlob(pattern As string) As Tuple (Of Template, error)

Parameters:

  • pattern:

Templates

 

method Templates: Slice<Reference<Template>>

 

Slice<Reference<Template>> Templates()

 

func Templates() -> Slice<Reference<Template>>

 

func Templates() Slice<Reference<Template>>

 

Function Templates() As Slice<Reference<Template>>