protected string GetMessage(System.Resources.ResourceManager rm) {
Contract.Requires(rm != null);
string/*?*/ localizedString = null;
try {
localizedString = rm.GetString(this.messageKey);
} catch (System.Resources.MissingManifestResourceException) {
#if !COMPACTFX
} catch (System.Resources.MissingSatelliteAssemblyException) {
#endif
}
try {
if (localizedString == null)
localizedString = rm.GetString(this.messageKey, System.Globalization.CultureInfo.InvariantCulture);
} catch (System.Resources.MissingManifestResourceException) {
}
if (localizedString == null) localizedString = this.messageKey;
if (this.messageArguments.Length == 0) return localizedString;
try {
return string.Format(localizedString, this.messageArguments);
} catch (FormatException) {
return localizedString;
}
}