/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="topicPath">Path to the topic related entity</param> /// <param name="name">Name of the subscription</param> /// <param name="receiveMode">Receive mode</param> internal SubscriptionClient(MessagingFactory factory, string topicPath, string name, ReceiveMode receiveMode) { this.MessagingFactory = factory; this.TopicPath = topicPath; this.Name = name; this.Mode = receiveMode; this.SubscriptionPath = topicPath + "/Subscriptions/" + name; }
/// <summary> /// Constructor /// </summary> /// <param name="deviceName">Device name</param> /// <param name="deviceId">Device ID</param> /// <param name="connectionString">Connection string to Service Bus namespace</param> /// <param name="eventhubentity">Event Hub entity name</param> public IoTClientBase(string deviceName, string deviceId, string connectionString, string eventhubentity) { this.DeviceName = deviceName; this.DeviceId = deviceId; this.queue = new Queue<EventData>(); this.queueEvent = new AutoResetEvent(false); ServiceBusConnectionStringBuilder builder = new ServiceBusConnectionStringBuilder(connectionString); builder.TransportType = TransportType.Amqp; this.factory = MessagingFactory.CreateFromConnectionString(builder.ToString()); this.client = this.factory.CreateEventHubClient(eventhubentity); }
/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="path">Entity path</param> internal MessageReceiver(MessagingFactory factory, string path) { this.MessagingFactory = factory; this.Path = path; }
/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="path">Path to the event hub entity</param> internal TopicClient(MessagingFactory factory, string path) { this.MessagingFactory = factory; this.Path = path; }
/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="path">Path to the event hub entity</param> /// <param name="receiveMode">Receive mode</param> internal QueueClient(MessagingFactory factory, string path, ReceiveMode receiveMode) { this.MessagingFactory = factory; this.Path = path; this.Mode = receiveMode; }
/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="subscriptionPath">Path to the subscription entity</param> /// <param name="receiveMode">Receive mode</param> internal SubscriptionClient(MessagingFactory factory, string subscriptionPath, ReceiveMode receiveMode) { this.MessagingFactory = factory; this.SubscriptionPath = subscriptionPath; this.Mode = receiveMode; }
/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="eventHubPath">Path of the event hub</param> /// <param name="groupName">Name of the consumer group</param> internal EventHubConsumerGroup(MessagingFactory factory, string eventHubPath, string groupName) { this.MessagingFactory = factory; this.EventHubPath = eventHubPath; this.GroupName = groupName; }
/// <summary> /// Constructor /// </summary> /// <param name="factory">Messaging factory</param> /// <param name="path">Path to the event hub entity</param> internal EventHubClient(MessagingFactory factory, string path) { this.MessagingFactory = factory; this.Path = path; }