// Token: 0x06003526 RID: 13606 RVA: 0x000CE2FC File Offset: 0x000CC4FC public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { TraceLoggingMetadataCollector traceLoggingMetadataCollector = collector.AddGroup(name); if (this.properties != null) { foreach (PropertyAnalysis propertyAnalysis in this.properties) { EventFieldFormat format2 = EventFieldFormat.Default; EventFieldAttribute fieldAttribute = propertyAnalysis.fieldAttribute; if (fieldAttribute != null) { traceLoggingMetadataCollector.Tags = fieldAttribute.Tags; format2 = fieldAttribute.Format; } propertyAnalysis.typeInfo.WriteMetadata(traceLoggingMetadataCollector, propertyAnalysis.name, format2); } } }
public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { TraceLoggingMetadataCollector collector1 = collector.AddGroup(name); if (this.properties == null) { return; } foreach (PropertyAnalysis property in this.properties) { EventFieldFormat format1 = EventFieldFormat.Default; EventFieldAttribute eventFieldAttribute = property.fieldAttribute; if (eventFieldAttribute != null) { collector1.Tags = eventFieldAttribute.Tags; format1 = eventFieldAttribute.Format; } property.typeInfo.WriteMetadata(collector1, property.name, format1); } }
internal TraceLoggingEventTypes( string name, EventTags tags, System.Reflection.ParameterInfo[] paramInfos) { if (name is null) { throw new ArgumentNullException(nameof(name)); } this.typeInfos = MakeArray(paramInfos); #if FEATURE_PERFTRACING this.paramNames = MakeParamNameArray(paramInfos); #endif this.name = name; this.tags = tags; this.level = Statics.DefaultLevel; var collector = new TraceLoggingMetadataCollector(); for (int i = 0; i < typeInfos.Length; ++i) { TraceLoggingTypeInfo typeInfo = typeInfos[i]; this.level = Statics.Combine((int)typeInfo.Level, this.level); this.opcode = Statics.Combine((int)typeInfo.Opcode, this.opcode); this.keywords |= typeInfo.Keywords; string?paramName = paramInfos[i].Name; if (Statics.ShouldOverrideFieldName(paramName !)) { paramName = typeInfo.Name; } typeInfo.WriteMetadata(collector, paramName, EventFieldFormat.Default); } this.typeMetadata = collector.GetMetadata(); this.scratchSize = collector.ScratchSize; this.dataCount = collector.DataCount; this.pinCount = collector.PinCount; }
private TraceLoggingEventTypes(EventTags tags, string defaultName, TraceLoggingTypeInfo[] typeInfos) { if (defaultName == null) { throw new ArgumentNullException("defaultName"); } this.typeInfos = typeInfos; this.name = defaultName; this.tags = tags; this.level = (byte)5; TraceLoggingMetadataCollector collector = new TraceLoggingMetadataCollector(); foreach (TraceLoggingTypeInfo typeInfo in typeInfos) { this.level = Statics.Combine((int)typeInfo.Level, this.level); this.opcode = Statics.Combine((int)typeInfo.Opcode, this.opcode); this.keywords = this.keywords | typeInfo.Keywords; typeInfo.WriteMetadata(collector, (string)null, EventFieldFormat.Default); } this.typeMetadata = collector.GetMetadata(); this.scratchSize = collector.ScratchSize; this.dataCount = collector.DataCount; this.pinCount = collector.PinCount; }
// Token: 0x06003575 RID: 13685 RVA: 0x000CEB16 File Offset: 0x000CCD16 public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.AddArray(name, Statics.Format8(format, TraceLoggingDataType.Int8)); }
// Token: 0x060035B9 RID: 13753 RVA: 0x000CEE30 File Offset: 0x000CD030 public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.AddBinary(name, Statics.MakeDataType(TraceLoggingDataType.CountedUtf16String, format)); }
// Token: 0x06003569 RID: 13673 RVA: 0x000CEA1C File Offset: 0x000CCC1C public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.AddScalar(name, Statics.Format32(format, TraceLoggingDataType.Float)); }
// Token: 0x0600358D RID: 13709 RVA: 0x000CEC2C File Offset: 0x000CCE2C public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.AddArray(name, Statics.FormatPtr(format, Statics.UIntPtrType)); }
// Token: 0x060034BA RID: 13498 RVA: 0x000CD1EA File Offset: 0x000CB3EA public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.BeginBufferedArray(); this.elementInfo.WriteMetadata(collector, name, format); collector.EndBufferedArray(); }
// Token: 0x060035C0 RID: 13760 RVA: 0x000CEE9A File Offset: 0x000CD09A public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.AddArray(name, Statics.MakeDataType(TraceLoggingDataType.Guid, format)); }
// Token: 0x06003541 RID: 13633 RVA: 0x000CE85E File Offset: 0x000CCA5E public override void WriteMetadata(TraceLoggingMetadataCollector collector, string name, EventFieldFormat format) { collector.AddGroup(name); }
public override void WriteMetadata(TraceLoggingMetadataCollector collector, string?name, EventFieldFormat format) { collector.AddScalar(name !, Statics.FormatScalar(format, nativeFormat)); }
/// <summary> /// When overridden by a derived class, writes the metadata (schema) for /// this type. Note that the sequence of operations in WriteMetadata should be /// essentially identical to the sequence of operations in /// WriteData/WriteObjectData. Otherwise, the metadata and data will not match, /// which may cause trouble when decoding the event. /// </summary> /// <param name="collector"> /// The object that collects metadata for this object's type. Metadata is written /// by calling methods on the collector object. Note that if the type contains /// sub-objects, the implementation of this method may need to call the /// WriteMetadata method for the type of the sub-object, e.g. by calling /// TraceLoggingTypeInfo<SubType>.Instance.WriteMetadata(...). /// </param> /// <param name="name"> /// The name of the property that contains an object of this type, or null if this /// object is being written as a top-level object of an event. Typical usage /// is to pass this value to collector.AddGroup. /// </param> /// <param name="format"> /// The format attribute for the field that contains an object of this type. /// </param> public abstract void WriteMetadata( TraceLoggingMetadataCollector collector, string?name, EventFieldFormat format);
private TraceLoggingMetadataCollector(TraceLoggingMetadataCollector other, FieldMetadata group) { this.impl = other.impl; this.currentGroup = group; }