private static void ApplyTrafficControlPercentage(ResponseAttributes.Builder builder, JsonObjectValue appConfigObject) { if (!(appConfigObject[ResponseKeyTrafficControlPercentage] is JsonNumberValue numberValue)) { return; } builder.WithTrafficControlPercentage(numberValue.IntValue); }
private static void ApplyTrafficControlPercentage(ResponseAttributes.Builder builder, Dictionary <string, string> keyValuePairs) { if (!keyValuePairs.TryGetValue(ResponseKeyTrafficControlPercentage, out var tcValue)) { return; } var trafficControlPercentage = int.Parse(tcValue); builder.WithTrafficControlPercentage(trafficControlPercentage); }