Microsoft.HockeyApp.Channel.PersistenceChannel.Send C# (CSharp) Method

Send() public method

Sends an instance of ITelemetry through the channel.
public Send ( ITelemetry item ) : void
item ITelemetry
return void
        public void Send(ITelemetry item)
        {
            if (this.DeveloperMode.HasValue && this.DeveloperMode == true)
            {
                this.Transmitter.SendForDeveloperMode(item, this.EndpointAddress);
            }
            else
            {
                this.TelemetryBuffer.Enqueue(item);
            }
        }

Usage Example

            public void PassesTelemetryToMemoryBufferChannel()
            {
                ServiceLocator.AddService <BaseStorageService>(new StorageService());
                var channel = new PersistenceChannel();

                var telemetry = new StubTelemetry();

                channel.Send(telemetry);

                IEnumerable <ITelemetry> actual = channel.TelemetryBuffer.Dequeue();

                Assert.AreEqual(telemetry, actual.First());
            }
All Usage Examples Of Microsoft.HockeyApp.Channel.PersistenceChannel::Send