// Token: 0x060034BB RID: 13499 RVA: 0x000CD208 File Offset: 0x000CB408
        public override void WriteData(TraceLoggingDataCollector collector, ref ElementType[] value)
        {
            int bookmark = collector.BeginBufferedArray();
            int count    = 0;

            if (value != null)
            {
                count = value.Length;
                for (int i = 0; i < value.Length; i++)
                {
                    this.elementInfo.WriteData(collector, ref value[i]);
                }
            }
            collector.EndBufferedArray(bookmark, count);
        }
Пример #2
0
        public override void WriteData(PropertyValue value)
        {
            int bookmark = TraceLoggingDataCollector.BeginBufferedArray();

            int         count      = 0;
            IEnumerable?enumerable = (IEnumerable?)value.ReferenceValue;

            if (enumerable != null)
            {
                foreach (object?element in enumerable)
                {
                    this.elementInfo.WriteData(elementInfo.PropertyValueFactory(element));
                    count++;
                }
            }

            TraceLoggingDataCollector.EndBufferedArray(bookmark, count);
        }
Пример #3
0
        public override void WriteData(TraceLoggingDataCollector collector, ref IterableType value)
        {
            int bookmark = collector.BeginBufferedArray();
            int count    = 0;

            if ((object)value != null)
            {
                using (IEnumerator <ElementType> enumerator = value.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ElementType current = enumerator.Current;
                        this.elementInfo.WriteData(collector, ref current);
                        ++count;
                    }
                }
            }
            collector.EndBufferedArray(bookmark, count);
        }