/// <summary> /// This method validates that the Event Hub connection is set. /// </summary> /// <param name="Configuration">The configuration.</param> /// <param name="eventHubsConnection">The alternate connection.</param> /// <returns>Returns the connection from either the parameter or from the settings.</returns> private static string EventHubsConnectionValidate(this IEnvironmentConfiguration Configuration, string eventHubsConnection) { var conn = eventHubsConnection ?? Configuration.EventHubsConnection(); if (string.IsNullOrEmpty(conn)) { throw new AzureConnectionException();//"Service bus connection string cannot be resolved. Please check the config settings has been set."); } return(conn); }
/// <summary> /// This method validates that the Event Hub connection is set. /// </summary> /// <param name="Configuration">The configuration.</param> /// <param name="eventHubsConnection">The alternate connection.</param> /// <returns>Returns the connection from either the parameter or from the settings.</returns> private static string EventHubsConnectionValidate(this IEnvironmentConfiguration Configuration, string eventHubsConnection) { var conn = eventHubsConnection ?? Configuration.EventHubsConnection(); if (string.IsNullOrEmpty(conn)) { throw new AzureConnectionException(AzureExtensionMethods.KeyEventHubsConnection); } return(conn); }