本文整理汇总了C#中Roslyn.Utilities.ObjectReader.ReadValue方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectReader.ReadValue方法的具体用法?C# ObjectReader.ReadValue怎么用?C# ObjectReader.ReadValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Roslyn.Utilities.ObjectReader
的用法示例。
在下文中一共展示了ObjectReader.ReadValue方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WithTwoChildren
internal WithTwoChildren(ObjectReader reader)
: base(reader)
{
this.SlotCount = 2;
_child0 = (GreenNode)reader.ReadValue();
this.AdjustFlagsAndWidth(_child0);
_child1 = (GreenNode)reader.ReadValue();
this.AdjustFlagsAndWidth(_child1);
}
示例2: SyntaxIdentifierWithTrivia
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);
}
}
示例3: SyntaxTokenWithTrivia
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;
}
}
示例4: SyntaxIdentifierWithTrailingTrivia
internal SyntaxIdentifierWithTrailingTrivia(ObjectReader reader)
: base(reader)
{
var trailing = (CSharpSyntaxNode)reader.ReadValue();
if (trailing != null)
{
this.AdjustFlagsAndWidth(trailing);
this.trailing = trailing;
}
}
开发者ID:modulexcite,项目名称:pattern-matching-csharp,代码行数:10,代码来源:SyntaxToken.SyntaxIdentifierWithTrailingTrivia.cs
示例5: WithManyChildrenBase
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();
}
示例6: LocalizableResourceString
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();
}
}
示例7: DiagnosticInfo
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();
}
}
}
示例8: ReadFrom
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);
}
示例9: DiagnosticInfo
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();
}
}
}
示例10: DiagnosticInfo
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();
}
}
}
示例11: GreenNode
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);
}
}
}