A transmitter that will immediately send telemetry over HTTP. Telemetry items are being sent when Flush is called, or when the buffer is full (An OnFull "event" is raised) or every 30 seconds.
Inheritance: IDisposable
            public void CanBeChangedByChannelToTunePerformance()
            {
                var transmitter = new InMemoryTransmitter(new TelemetryBuffer());

                var expectedValue = TimeSpan.FromSeconds(42);
                transmitter.SendingInterval = expectedValue;

                Assert.Equal(expectedValue, transmitter.SendingInterval);
            }
Esempio n. 2
0
            public void CanBeChangedByChannelToTunePerformance()
            {
                var transmitter = new InMemoryTransmitter(new TelemetryBuffer());

                var expectedValue = TimeSpan.FromSeconds(42);

                transmitter.SendingInterval = expectedValue;

                Assert.Equal(expectedValue, transmitter.SendingInterval);
            }
 /// <summary>
 /// Initializes a new instance of the <see cref="InMemoryChannel" /> class. Used in unit tests for constructor injection.  
 /// </summary>
 /// <param name="telemetryBuffer">The telemetry buffer that will be used to enqueue new events.</param>
 /// <param name="transmitter">The in memory transmitter that will send the events queued in the buffer.</param>
 internal InMemoryChannel(TelemetryBuffer telemetryBuffer, InMemoryTransmitter transmitter)
 {
     this.buffer = telemetryBuffer;
     this.transmitter = transmitter;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InMemoryChannel" /> class.
 /// </summary>
 public InMemoryChannel()
 {
     this.buffer = new TelemetryBuffer();
     this.transmitter = new InMemoryTransmitter(this.buffer);
 }
 public void DefaultValueIsAppropriateForProductionEnvironmentAndUnitTests()
 {
     var transmitter = new InMemoryTransmitter(new TelemetryBuffer());
     Assert.Equal(TimeSpan.FromSeconds(30), transmitter.SendingInterval);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InMemoryChannel" /> class. Used in unit tests for constructor injection.
 /// </summary>
 /// <param name="telemetryBuffer">The telemetry buffer that will be used to enqueue new events.</param>
 /// <param name="transmitter">The in memory transmitter that will send the events queued in the buffer.</param>
 internal InMemoryChannel(TelemetryBuffer telemetryBuffer, InMemoryTransmitter transmitter)
 {
     this.buffer      = telemetryBuffer;
     this.transmitter = transmitter;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="InMemoryChannel" /> class.
 /// </summary>
 public InMemoryChannel()
 {
     this.buffer      = new TelemetryBuffer();
     this.transmitter = new InMemoryTransmitter(this.buffer);
 }
Esempio n. 8
0
            public void DefaultValueIsAppropriateForProductionEnvironmentAndUnitTests()
            {
                var transmitter = new InMemoryTransmitter(new TelemetryBuffer());

                Assert.Equal(TimeSpan.FromSeconds(30), transmitter.SendingInterval);
            }