// parse the fixing date offset section internal static void parseFixingDateOffset(PropertySet section, Dictionary <string, ImmutableFloatingRateName> mutableMap) { // find our names from the RHS of the key/value pairs foreach (string key in section.keys()) { int?days = int.Parse(section.value(key)); ImmutableFloatingRateName name = mutableMap[key.ToUpper(Locale.ENGLISH)]; ImmutableFloatingRateName updated = name.toBuilder().fixingDateOffsetDays(days).build(); mutableMap[key.ToUpper(Locale.ENGLISH)] = updated; } }
// parse a single section internal static void parseSection(PropertySet section, string indexNameSuffix, FloatingRateType type, Dictionary <string, ImmutableFloatingRateName> mutableMap) { // find our names from the RHS of the key/value pairs foreach (string key in section.keys()) { ImmutableFloatingRateName name = ImmutableFloatingRateName.of(key, section.value(key) + indexNameSuffix, type); mutableMap[key] = name; if (!mutableMap.ContainsKey(key.ToUpper(Locale.ENGLISH))) { mutableMap.Add(key.ToUpper(Locale.ENGLISH), name); } } }