internal void WriteTo(ObjectWriter writer) { writer.WriteString(Name); writer.WriteString(ContainerDisplayName); writer.WriteString(FullyQualifiedContainerName); writer.WriteByte((byte)Kind); writer.WriteInt32(Span.Start); writer.WriteInt32(Span.Length); writer.WriteUInt16(ParameterCount); writer.WriteUInt16(TypeParameterCount); }
internal virtual void WriteTo(ObjectWriter writer) { var kindBits = (UInt16)_kind; var hasDiagnostics = this.GetDiagnostics().Length > 0; var hasAnnotations = this.GetAnnotations().Length > 0; if (hasDiagnostics || hasAnnotations) { kindBits |= ExtendedSerializationInfoMask; } writer.WriteUInt16(kindBits); if (hasDiagnostics || hasAnnotations) { writer.WriteValue(hasDiagnostics ? this.GetDiagnostics() : null); writer.WriteValue(hasAnnotations ? this.GetAnnotations() : null); } }