Share via


MessageTemplate Constructors

Definition

Overloads

MessageTemplate(String, String)

Initializes a new instance of MessageTemplate.

MessageTemplate(String, String, IEnumerable<MessageTemplateValue>, MessageTemplateBindings)

Initializes a new instance of the MessageTemplate class.

MessageTemplate(String, String)

Source:
MessageTemplate.cs

Initializes a new instance of MessageTemplate.

public MessageTemplate (string name, string language);
new Azure.Communication.Messages.MessageTemplate : string * string -> Azure.Communication.Messages.MessageTemplate
Public Sub New (name As String, language As String)

Parameters

name
String

Name of the template.

language
String

The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.

Exceptions

name or language is null.

Applies to

MessageTemplate(String, String, IEnumerable<MessageTemplateValue>, MessageTemplateBindings)

Source:
MessageTemplate.cs

Initializes a new instance of the MessageTemplate class.

public MessageTemplate (string name, string language, System.Collections.Generic.IEnumerable<Azure.Communication.Messages.MessageTemplateValue> values = default, Azure.Communication.Messages.MessageTemplateBindings bindings = default);
new Azure.Communication.Messages.MessageTemplate : string * string * seq<Azure.Communication.Messages.MessageTemplateValue> * Azure.Communication.Messages.MessageTemplateBindings -> Azure.Communication.Messages.MessageTemplate
Public Sub New (name As String, language As String, Optional values As IEnumerable(Of MessageTemplateValue) = Nothing, Optional bindings As MessageTemplateBindings = Nothing)

Parameters

name
String

Name of the template.

language
String

The codes for the supported languages for templates.

values
IEnumerable<MessageTemplateValue>

The template values.

bindings
MessageTemplateBindings

The binding object to link values to the template specific locations.

Applies to