Ejemplo n.º 1
0
 public MqttProvider(MessagingSettings settings)
 {
     _settings = settings;
 }
Ejemplo n.º 2
0
        public static IServiceCollection AddMqttClientProvider(this IServiceCollection services, MessagingSettings messagingSettings)
        {
            services.AddSingleton <IMessagingProvider>(ctx =>
            {
                var mqttProvider = new MqttProvider(messagingSettings);
                mqttProvider.SetupMqtt();

                return(mqttProvider);
            });

            return(services);
        }
Ejemplo n.º 3
0
 public MqttMessagingClient(MessagingSettings settings, IManagedMqttClient client)
 {
     InternalClient = client;
     InternalClient.ApplicationMessageReceivedHandler = this;
     _settings = settings;
 }