Class MessageStringSetExtensions
Provides a set of static methods related to IMessageStringSet.
public static class MessageStringSetExtensions
- Inheritance
-
MessageStringSetExtensions
- Inherited Members
Methods
GetStringOrDefault(ILocalizableMessageStringSet, string, string)
Gets a string in the string set, or a default string in the string set if not found.
public static ILocalizable<string> GetStringOrDefault(this ILocalizableMessageStringSet set, string name, string defaultName = "")
Parameters
setILocalizableMessageStringSet- The string set.
namestring- The name of the string.
defaultNamestring- The name of the default string.
Returns
- ILocalizable<string>
- The string of the specified name in the resource, or the default string of the specified default name in the string set if not found.
GetStringOrDefault(IMessageStringSet, string, string)
Gets a string in the string set, or a default string in the string set if not found.
public static string GetStringOrDefault(this IMessageStringSet set, string name, string defaultName = "")
Parameters
setIMessageStringSet- The string set.
namestring- The name of the string.
defaultNamestring- The name of the default string.
Returns
- string
- The string of the specified name in the resource, or the default string of the specified default name in the string set if not found.
Exceptions
- KeyNotFoundException
- The default string of the specified default name is not found.
GetStringRequired(ILocalizableMessageStringSet, string)
Gets a string in the string set.
public static ILocalizable<string> GetStringRequired(this ILocalizableMessageStringSet set, string name)
Parameters
setILocalizableMessageStringSet- The string set.
namestring- The name of the string.
Returns
- ILocalizable<string>
- The string of the specified name in the resource.
GetStringRequired(IMessageStringSet, string)
Gets a string in the string set.
public static string GetStringRequired(this IMessageStringSet set, string name)
Parameters
setIMessageStringSet- The string set.
namestring- The name of the string.
Returns
- string
- The string of the specified name in the resource.
Exceptions
- KeyNotFoundException
- The string of the specified name is not found.
GetStringSetRequired(IMessageStringSet, string)
Gets a string set in the string set.
public static IMessageStringSet GetStringSetRequired(this IMessageStringSet set, string name)
Parameters
setIMessageStringSet- The string set.
namestring- The name of the string set.
Returns
- IMessageStringSet
- The string set of the specified name in the string set.
Exceptions
- KeyNotFoundException
- The string set of the specified name is not found.