public static void GetAllDsnCodesAndMessages(out string[] statusCodes, out LocalizedString[] messages) { Dictionary <string, LocalizedString> dictionary; if (DsnVariantConfiguration.SystemMessageOverridesEnabled()) { dictionary = new Dictionary <string, LocalizedString>(DsnDefaultMessages.statusToExplanation, StringComparer.OrdinalIgnoreCase); using (Dictionary <string, LocalizedString> .KeyCollection.Enumerator enumerator = DsnDefaultMessages.statusToExplanationDataCenterOverrides.Keys.GetEnumerator()) { while (enumerator.MoveNext()) { string key = enumerator.Current; dictionary[key] = DsnDefaultMessages.statusToExplanationDataCenterOverrides[key]; } goto IL_62; } } dictionary = DsnDefaultMessages.statusToExplanation; IL_62: statusCodes = new string[dictionary.Count]; messages = new LocalizedString[dictionary.Count]; dictionary.Keys.CopyTo(statusCodes, 0); dictionary.Values.CopyTo(messages, 0); }
public static bool TryGetResourceRecipientExplanation(string enhancedStatusCode, out LocalizedString explanation) { return((DsnVariantConfiguration.SystemMessageOverridesEnabled() && DsnDefaultMessages.statusToExplanationDataCenterOverrides.TryGetValue(enhancedStatusCode, out explanation)) || DsnDefaultMessages.statusToExplanation.TryGetValue(enhancedStatusCode, out explanation)); }