本文整理汇总了C#中Orchard.Localization.LocalizedString.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# LocalizedString.ToString方法的具体用法?C# LocalizedString.ToString怎么用?C# LocalizedString.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orchard.Localization.LocalizedString
的用法示例。
在下文中一共展示了LocalizedString.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendMessage
public void SendMessage(FeedbackLevel level, LocalizedString message)
{
switch (level)
{
case FeedbackLevel.Info:
Logger.Information(message.ToString());
return;
case FeedbackLevel.Warn:
Logger.Information(message.ToString());
return;
case FeedbackLevel.Error:
Logger.Information(message.ToString());
return;
}
}
示例2: Error
public static void Error(this Controller controller,
Exception exception,
LocalizedString localizedString,
ILogger logger,
INotifier notifier) {
logger.Error(exception, localizedString.ToString());
notifier.Error(localizedString);
for (Exception innerException = exception; innerException != null ; innerException = innerException.InnerException) {
notifier.Error(new LocalizedString(innerException.Message));
}
}
示例3: AddModelError
public static void AddModelError(this ModelStateDictionary modelStateDictionary, string key, LocalizedString errorMessage) {
modelStateDictionary.AddModelError(key, errorMessage.ToString());
}
示例4: AddModelError
public void AddModelError(string key, LocalizedString errorMessage)
{
ModelState.AddModelError(key, errorMessage.ToString());
}
示例5: Sticky
/// <summary>
/// Adds a new UI notification of type Sticky
/// </summary>
/// <seealso cref="INotifier.Add()"/>
/// <param name="message">A localized message to display</param>
/// <param name="type">The type of the notificaion.</param>
public static void Sticky(this INotifier notifier, NotifyType type, LocalizedString message)
{
message = new LocalizedString(Constants.Sticky + message.ToString());
notifier.Add(type, message);
}