internal WithTwoChildren(ObjectReader reader) : base(reader) { this.SlotCount = 2; _child0 = (GreenNode)reader.ReadValue(); this.AdjustFlagsAndWidth(_child0); _child1 = (GreenNode)reader.ReadValue(); this.AdjustFlagsAndWidth(_child1); }
internal SyntaxIdentifierWithTrivia(ObjectReader reader) : base(reader) { var leading = (GreenNode)reader.ReadValue(); if (leading != null) { this.AdjustFlagsAndWidth(leading); _leading = leading; } var trailing = (GreenNode)reader.ReadValue(); if (trailing != null) { _trailing = trailing; this.AdjustFlagsAndWidth(trailing); } }
internal SyntaxTokenWithTrivia(ObjectReader reader) : base(reader) { var leading = (CSharpSyntaxNode)reader.ReadValue(); if (leading != null) { this.AdjustFlagsAndWidth(leading); this.LeadingField = leading; } var trailing = (CSharpSyntaxNode)reader.ReadValue(); if (trailing != null) { this.AdjustFlagsAndWidth(trailing); this.TrailingField = trailing; } }
internal SyntaxIdentifierWithTrailingTrivia(ObjectReader reader) : base(reader) { var trailing = (CSharpSyntaxNode)reader.ReadValue(); if (trailing != null) { this.AdjustFlagsAndWidth(trailing); this.trailing = trailing; } }
internal WithManyChildrenBase(ObjectReader reader) : base(reader) { var length = reader.ReadInt32(); this.children = new ArrayElement<GreenNode>[length]; for (var i = 0; i < length; i++) { this.children[i].Value = (GreenNode)reader.ReadValue(); } this.InitializeChildren(); }
private LocalizableResourceString(ObjectReader reader) { _resourceSource = (Type)reader.ReadValue(); _nameOfLocalizableResource = reader.ReadString(); _resourceManager = new ResourceManager(_resourceSource); var length = (int)reader.ReadCompressedUInt(); if (length == 0) { _formatArguments = SpecializedCollections.EmptyArray<string>(); } else { var argumentsBuilder = ArrayBuilder<string>.GetInstance(length); for (int i = 0; i < length; i++) { argumentsBuilder.Add(reader.ReadString()); } _formatArguments = argumentsBuilder.ToArrayAndFree(); } }
protected DiagnosticInfo(ObjectReader reader) { _messageProvider = (CommonMessageProvider)reader.ReadValue(); _errorCode = (int)reader.ReadCompressedUInt(); _effectiveSeverity = (DiagnosticSeverity)reader.ReadInt32(); _defaultSeverity = (DiagnosticSeverity)reader.ReadInt32(); var count = (int)reader.ReadCompressedUInt(); if (count == 0) { _arguments = SpecializedCollections.EmptyObjects; } else if (count > 0) { _arguments = new string[count]; for (int i = 0; i < count; i++) { _arguments[i] = reader.ReadString(); } } }
public static DocumentAttributes ReadFrom(ObjectReader reader) { var documentId = DocumentId.ReadFrom(reader); var name = reader.ReadString(); var folders = (string[])reader.ReadValue(); var sourceCodeKind = reader.ReadInt32(); var filePath = reader.ReadString(); var isGenerated = reader.ReadBoolean(); return new DocumentAttributes(documentId, name, folders, (SourceCodeKind)sourceCodeKind, filePath, isGenerated); }
protected DiagnosticInfo(ObjectReader reader) { _messageProvider = (CommonMessageProvider)reader.ReadValue(); _errorCode = reader.ReadInt32(); _effectiveSeverity = (DiagnosticSeverity)reader.ReadInt32(); _defaultSeverity = (DiagnosticSeverity)reader.ReadInt32(); var count = reader.ReadInt32(); if (count == 0) { _arguments = Array.Empty<object>(); } else if (count > 0) { _arguments = new string[count]; for (int i = 0; i < count; i++) { _arguments[i] = reader.ReadString(); } } }
protected DiagnosticInfo(ObjectReader reader) { this.messageProvider = (CommonMessageProvider)reader.ReadValue(); this.errorCode = (int)reader.ReadCompressedUInt(); this.isWarningAsError = reader.ReadBoolean(); var count = (int)reader.ReadCompressedUInt(); if (count == 0) { this.arguments = NoArguments; } else if (count > 0) { this.arguments = new string[count]; for (int i = 0; i < count; i++) { this.arguments[i] = reader.ReadString(); } } }
internal GreenNode(ObjectReader reader) { var kindBits = reader.ReadUInt16(); _kind = (ushort)(kindBits & ~ExtendedSerializationInfoMask); if ((kindBits & ExtendedSerializationInfoMask) != 0) { var diagnostics = (DiagnosticInfo[])reader.ReadValue(); if (diagnostics != null && diagnostics.Length > 0) { this.flags |= NodeFlags.ContainsDiagnostics; s_diagnosticsTable.Add(this, diagnostics); } var annotations = (SyntaxAnnotation[])reader.ReadValue(); if (annotations != null && annotations.Length > 0) { this.flags |= NodeFlags.ContainsAnnotations; s_annotationsTable.Add(this, annotations); } } }