コード例 #1
0
            public void Initialize()
            {
                var connectionConfiguration = ConnectionConfiguration.Create(connectionString, "ServiceControl.Monitoring");

                var dbConnectionStringBuilder = new DbConnectionStringBuilder {
                    ConnectionString = connectionString
                };

                connectionFactory = new ConnectionFactory(connectionConfiguration,
                                                          null, //providing certificates is not supported yet
                                                          dbConnectionStringBuilder.GetBooleanValue("DisableRemoteCertificateValidation"),
                                                          dbConnectionStringBuilder.GetBooleanValue("UseExternalAuthMechanism"));
            }
コード例 #2
0
        public static void ApplyConnectionString(this TransportExtensions <RabbitMQTransport> transport, string connectionString)
        {
            var builder = new DbConnectionStringBuilder {
                ConnectionString = connectionString
            };

            if (builder.GetBooleanValue("DisableRemoteCertificateValidation"))
            {
                transport.DisableRemoteCertificateValidation();
            }

            if (builder.GetBooleanValue("UseExternalAuthMechanism"))
            {
                transport.UseExternalAuthMechanism();
            }

            transport.ConnectionString(connectionString);
        }