private static string GetCountryCode()

in Azure WAF/Alert - Process Azure FrontDoor Alerts/ProcessAFDAlerts.cs [300:316]


        private static string GetCountryCode(string country)
        {
            return country.ToLower() switch
            {
                "united states" => "US",
                "unitedstates" => "US",
                "canada" => "CA",
                "brazil" => "BR",
                "ireland" => "IE",
                "australia" => "AU",
                "singapore" => "SG",
                "japan" => "JP",
                "france" => "FR",
                "india" => "IN",
                _ => country
            };
        }