Beispiel #1
0
        public static ITelemetryEventPayload Create(string name, PropertyBagContents contents)
        {
            var batch = new TelemetryEventPayload(name);

            batch.SetStringData(contents.StringProperties);
            batch.SetIntData(contents.IntProperties);
            batch.SetInt64Data(contents.Int64Properties);
            batch.SetBoolData(contents.BoolProperties);

            return(batch);
        }
        public void Upload(IEnumerable <PropertyBagContents> uploadEvents)
        {
            if (_dispatchAction == null)
            {
                return;
            }

            foreach (var uploadEvent in uploadEvents)
            {
                string name = UploadEventUtils.GetUploadEventName(_platformProxy, uploadEvent.EventType, AppName);
                _dispatchAction(TelemetryEventPayload.Create(name, uploadEvent));
            }
        }