/// <summary>
        /// Completes log destination build process by adding it to the parent log group destination builder.
        /// </summary>
        /// <returns></returns>
        public ILogGroupDestinationsBuilder Add()
        {
            // Mandatory dependencies.
            if (_rabbitMqConnection == null)
            {
                throw new InvalidOperationException("RabbitMQ connection was not specified during the build");
            }
            if (_publicationAddressProvider == null)
            {
                throw new InvalidOperationException("Publication address provider was not specified during the build");
            }

            // Dependencies with defaults.
            if (_messagePublisher == null)
            {
                _messagePublisher = new BasicMessagePublisher();
            }
            if (_logSerializer == null)
            {
                _logSerializer = new JsonLogSerializer();
            }

            // Create the destination.
            RabbitMqDestination rabbitMqDestination = new RabbitMqDestination(_rabbitMqConnection, _publicationAddressProvider, _logSerializer, _messagePublisher);

            // Add to log group and return it.
            return(_logGroupDestinationsBuilder.CustomDestination(rabbitMqDestination));
        }
        public ILogGroupDestinationsBuilder Add()
        {
            if (_dbContextProvider == null)
            {
                throw new InvalidOperationException("DbContext provider was not been provided during the build");
            }
            if (_dbEntityBuilder == null)
            {
                _dbEntityBuilder = new LogDbModelEntityBuilder();
            }

            // Create the destionation.
            EntityFrameworkDestination entityFrameworkDestination = new EntityFrameworkDestination(_dbContextProvider, _dbEntityBuilder);

            // Add to log group and return it.
            return(_logGroupDestinationsBuilder.CustomDestination(entityFrameworkDestination));
        }