public string ResolveRegion(string countryCode, string stateCode)
{
return GetRegionCode(Validate(stateCode), Validate(countryCode)) ?? string.Empty;
}
public string GetRegionCode(string stateCode, string countryCode)
{
return RegionMapping[countryCode][stateCode] ?? RegionMapping[countryCode][string.Empty];
}
public string Validate(string val)
{
return string.IsNullOrEmpty(val) ? string.Empty : val.ToUpper();
}