本文整理汇总了C#中Roslyn.Utilities.ObjectReader.ReadCompressedUInt方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectReader.ReadCompressedUInt方法的具体用法?C# ObjectReader.ReadCompressedUInt怎么用?C# ObjectReader.ReadCompressedUInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Roslyn.Utilities.ObjectReader
的用法示例。
在下文中一共展示了ObjectReader.ReadCompressedUInt方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
}
示例2: 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();
}
}
}
示例3: XmlSyntaxDiagnosticInfo
protected XmlSyntaxDiagnosticInfo(ObjectReader reader)
: base(reader)
{
this.xmlErrorCode = (XmlParseErrorCode)reader.ReadCompressedUInt();
}
示例4: 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();
}
}
}
示例5: XmlSyntaxDiagnosticInfo
private XmlSyntaxDiagnosticInfo(ObjectReader reader)
: base(reader)
{
_xmlErrorCode = (XmlParseErrorCode)reader.ReadCompressedUInt();
}