public ServiceBusHealthCheck(string nameSpace, string topicName, string AccessPolicyName, string accessPolicyKey) { this.connectionString = $"Endpoint=sb://{nameSpace}.servicebus.windows.net/;SharedAccessKeyName={AccessPolicyName};SharedAccessKey={accessPolicyKey};TransportType=AmqpWebSockets"; this.SendConnectionString = connectionString; this.ListenConnectionString = connectionString; this.topicName = topicName; this.serviceBusHealthCheckType = ServiceBusHealthCheckType.Send; this.nameSpace = nameSpace; }
public ServiceBusHealthCheck(string connectionString, string entityPath) { this.SendConnectionString = connectionString; this.ListenConnectionString = connectionString; this.topicName = entityPath; this.serviceBusHealthCheckType = ServiceBusHealthCheckType.Send; if (connectionString != null) { this.nameSpace = connectionString.Split('.')[0]; } }