public AzureServiceBusTopicPublisherClient(AzureServiceBusTopicPublisherEndpoint endpoint, IAzureServiceBusConfiguration sbConfiguration) : base(sbConfiguration) { if (endpoint == null) { throw new ArgumentNullException("endpoint"); } endpoint.Validate(); try { if (NsManager.TopicExists(endpoint.TopicName) == false) { NsManager.CreateTopic(endpoint.TopicName); } topicClient = TopicClient.CreateFromConnectionString(sbConfiguration.ConnectionString, endpoint.TopicName); topicClient.RetryPolicy = RetryExponential.Default; } catch (Exception ex) { throw new MessagingException( String.Format( "An error occurred while attempting to access the specified Azure service bus topic [{0}]. See inner exception for more details.", endpoint.TopicName), ex); } }
protected WindowsServiceBusQueueClient(WindowsServiceBusQueueEndpoint endpoint, IWindowsServiceBusConfiguration sbConfiguration) : base(sbConfiguration) { if (endpoint == null) { throw new ArgumentNullException("endpoint"); } endpoint.Validate(); try { if (NsManager.QueueExists(endpoint.QueueName) == false) { NsManager.CreateQueue(endpoint.QueueName); } QueueClient = QueueClient.CreateFromConnectionString(sbConfiguration.ConnectionString, endpoint.QueueName); } catch (Exception ex) { throw new MessagingException( String.Format( "An error occurred while attempting to access the specified Windows service bus queue [{0}]. See inner exception for more details.", endpoint.QueueName), ex); } }
public WindowsServiceBusSubscriptionSubscriberClient(WindowsServiceBusSubscriptionSubscriberEndpoint endpoint, IWindowsServiceBusConfiguration sbConfiguration) : base(sbConfiguration) { if (endpoint == null) { throw new ArgumentNullException("endpoint"); } endpoint.Validate(); try { if (NsManager.TopicExists(endpoint.TopicName) == false) { NsManager.CreateTopic(endpoint.TopicName); } if (NsManager.SubscriptionExists(endpoint.TopicName, endpoint.SubscriptionName) == false) { NsManager.CreateSubscription(endpoint.TopicName, endpoint.SubscriptionName); } subscriptionClient = SubscriptionClient.CreateFromConnectionString(sbConfiguration.ConnectionString, endpoint.TopicName, endpoint.SubscriptionName); } catch (Exception ex) { throw new MessagingException( String.Format( "An error occurred while attempting to access the specified Windows service bus subscription [{0}]. See inner exception for more details.", endpoint.TopicName), ex); } }
public void Create() { NsManager.CreateTopic(endpoint.TopicName); }
public bool DoesExist() { return(NsManager.TopicExists(endpoint.TopicName)); }
static ConverterLogic() { //bringt leider nix? _nsManager.AddNamespace("", "http://schemas.microsoft.com/winfx/2006/xaml/presentation"); NsManager.AddNamespace("defns", "http://schemas.microsoft.com/winfx/2006/xaml/presentation"); NsManager.AddNamespace("x", "http://schemas.microsoft.com/winfx/2006/xaml"); }
public void Create() { NsManager.CreateQueue(endpoint.QueueName); }
public bool DoesExist() { return(NsManager.QueueExists(endpoint.QueueName)); }
public void Create() { NsManager.CreateSubscription(endpoint.TopicName, endpoint.SubscriptionName); }
public bool DoesExist() { return(NsManager.SubscriptionExists(endpoint.TopicName, endpoint.SubscriptionName)); }
public void Create <T>() { NsManager.CreateSubscription(endpoint.TopicName, endpoint.SubscriptionName, new SqlFilter(String.Format("MantleType = '{0}'", typeof(T).GetMessagingTypeString()))); }