/// <summary> /// Gets the <see cref="ImmutableIntegrationSettings"/> for the specified integration. /// </summary> /// <param name="integrationName">The name of the integration.</param> /// <returns>The integration-specific settings for the specified integration.</returns> public ImmutableIntegrationSettings this[string integrationName] { get { if (IntegrationRegistry.TryGetIntegrationId(integrationName, out var integrationId)) { return(Settings[(int)integrationId]); } Log.Warning( "Accessed integration settings for unknown integration {IntegrationName}. Returning default settings", integrationName); return(new ImmutableIntegrationSettings(integrationName)); } }
/// <summary> /// Gets the <see cref="IntegrationSettings"/> for the specified integration. /// </summary> /// <param name="integrationName">The name of the integration.</param> /// <returns>The integration-specific settings for the specified integration.</returns> public IntegrationSettings this[string integrationName] { get { if (IntegrationRegistry.TryGetIntegrationId(integrationName, out var integrationId)) { return(_settings[(int)integrationId]); } Log.Warning( "Accessed integration settings for unknown integration {IntegrationName}. " + "Returning default settings, changes will not be saved", integrationName); return(new IntegrationSettings(integrationName, source: null)); } }