本文整理匯總了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);
}