Class MessageTemplates
Contains a set of predefined message templates used throughout the application for consistent logging.
Inheritance
object
Namespace: Umbraco.Cms.Core.Logging
Assembly: Umbraco.Infrastructure.dll
Syntax
public class MessageTemplates : IMessageTemplates
Constructors
View SourceMessageTemplates()
Declaration
public MessageTemplates()
Methods
View SourceRender(string, params object[])
Renders a message template by formatting it with the provided arguments.
Declaration
public string Render(string messageTemplate, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | messageTemplate | The message template containing placeholders for arguments. |
| object[] | args | The arguments to insert into the message template placeholders. |
Returns
| Type | Description |
|---|---|
| string | A formatted string with the arguments applied to the message template. |
Exceptions
| Type | Condition |
|---|---|
| FormatException | Thrown if the message template cannot be formatted with the provided arguments. |