/// <summary> /// Adds an item of configuration under the specified name. /// </summary> /// <param name="name"> the name of the configuration item </param> /// <param name="value"> the configuration item </param> /// <returns> this builder </returns> public MarketDataConfigBuilder add <T1>(TypedString <T1> name, object value) { ArgChecker.notNull(name, "name"); ArgChecker.notNull(value, "value"); Type configType = value.GetType(); SingleTypeMarketDataConfig configs = configsForType(configType); values[configType] = configs.withConfig(name.Name, value); return(this); }
/// <summary> /// Returns the configuration object with the specified type and name if available. /// </summary> /// <param name="type"> the type of the configuration object </param> /// <param name="name"> the name of the configuration object </param> /// @param <T> the type of the configuration object </param> /// <returns> the configuration with the specified type and name </returns> /// <exception cref="IllegalArgumentException"> if no configuration is found with the specified type and name </exception> //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @SuppressWarnings("unchecked") public <T> T get(Class<T> type, com.opengamma.strata.collect.TypedString<?> name) public T get <T, T1>(Type <T> type, TypedString <T1> name) { return(get(type, name.Name)); }