Esempio n. 1
0
        public EventSender(
            MessagingFactory messagingFactory,
            SimulatorConfiguration config,
            Func<object, byte[]> serializer)
        {
            this._serializer = serializer;

            this._eventHubClient = messagingFactory.CreateEventHubClient(config.EventHubPath);
        }
        public SimulationProfile(
            string hostName,
            SimulatorConfiguration simulatorConfiguration)
        {
            Guard.ArgumentNotNullOrEmpty(hostName, "hostName");
            Guard.ArgumentNotNull(simulatorConfiguration, "simulatorConfiguration");

            _hostName = hostName;
            _simulatorConfiguration = simulatorConfiguration;
        }
        public SimulationProfile(
            string hostName,
            SimulatorConfiguration simulatorConfiguration)
        {
            Guard.ArgumentNotNullOrEmpty(hostName, "hostName");
            Guard.ArgumentNotNull(simulatorConfiguration, "simulatorConfiguration");

            _hostName = hostName;
            _simulatorConfiguration = simulatorConfiguration;
        }
Esempio n. 4
0
        public SimulationProfile(
            string hostName,
            int instanceCount,
            SimulatorConfiguration simulatorConfiguration)
        {
            _hostName = hostName;
            _simulatorConfiguration = simulatorConfiguration;

            _devicesPerInstance = simulatorConfiguration.NumberOfDevices / instanceCount;
        }
Esempio n. 5
0
        public EventSender(
            Device device,
            SimulatorConfiguration config,
            Func<object, byte[]> serializer)
        {
            this._serializer = serializer;

            var connectionString = ServiceBusConnectionStringBuilder.CreateUsingSharedAccessSignature(
                                         device.Endpoint,
                                         device.EventHubName,
                                         device.Id,
                                         device.Token
                                   );

            _eventHubSender = EventHubSender.CreateFromConnectionString(connectionString);
        }
Esempio n. 6
0
        public EventSender(
            Device device,
            SimulatorConfiguration config,
            Func <object, byte[]> serializer)
        {
            this._serializer = serializer;

            var connectionString = ServiceBusConnectionStringBuilder.CreateUsingSharedAccessSignature(
                device.Endpoint,
                device.EventHubName,
                device.Id,
                device.Token
                );

            _eventHubSender = EventHubSender.CreateFromConnectionString(connectionString);
        }