November Happy Hour will be moved to Thursday December 5th.

Class TemplateResolver

Represents template resolver.

Inheritance
System.Object
TemplateResolver
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.BusinessFoundation.Data
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 12.17.2
Syntax
public class TemplateResolver

Constructors

TemplateResolver()

Initializes a new instance of the TemplateResolver class.

Declaration
public TemplateResolver()

Properties

Current

Gets or sets the current.

Declaration
public static TemplateResolver Current { get; set; }
Property Value
Type Description
TemplateResolver

The current.

Methods

AddSource(String, ITemplateSource)

Adds the source.

Declaration
public void AddSource(string name, ITemplateSource source)
Parameters
Type Name Description
System.String name

The name.

ITemplateSource source

The source.

GetValue(String)

Resolves the specified single string.

Declaration
public object GetValue(string singleString)
Parameters
Type Name Description
System.String singleString

The single string, formatted "{source:key}".

Returns
Type Description
System.Object

GetValue(String, String)

Resolves the specified source.

Declaration
public object GetValue(string source, string key)
Parameters
Type Name Description
System.String source

The source.

System.String key

The key.

Returns
Type Description
System.Object

GetValue(String, String, String)

Resolves the specified source.

Declaration
public string GetValue(string source, string key, string format)
Parameters
Type Name Description
System.String source

The source.

System.String key

The key.

System.String format

The format.

Returns
Type Description
System.String

RemoveAllSources()

Removes all sources.

Declaration
public void RemoveAllSources()

RemoveSource(String)

Removes the source.

Declaration
public void RemoveSource(string name)
Parameters
Type Name Description
System.String name

The name.

Resolve(String)

Resolves the specified single string.

Declaration
public static object Resolve(string singleString)
Parameters
Type Name Description
System.String singleString

The single string.

Returns
Type Description
System.Object

Resolve(String, String)

Resolves the specified source.

Declaration
public static object Resolve(string source, string key)
Parameters
Type Name Description
System.String source

The source.

System.String key

The key.

Returns
Type Description
System.Object

Resolve(String, String, String)

Declaration
public static string Resolve(string source, string key, string format)
Parameters
Type Name Description
System.String source
System.String key
System.String format
Returns
Type Description
System.String

ResolveAll(String)

Resolves all templates from string and return string.

Declaration
public static string ResolveAll(string stringWithTemplate)
Parameters
Type Name Description
System.String stringWithTemplate

The string with template.

Returns
Type Description
System.String