当前位置: 首页>>代码示例>>C#>>正文


C# ObjectReader.ReadCompressedUInt方法代码示例

本文整理汇总了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();
            }
        }
开发者ID:GloryChou,项目名称:roslyn,代码行数:22,代码来源:LocalizableResourceString.cs

示例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();
                }
            }
        }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:21,代码来源:DiagnosticInfo.cs

示例3: XmlSyntaxDiagnosticInfo

 protected XmlSyntaxDiagnosticInfo(ObjectReader reader)
     : base(reader)
 {
     this.xmlErrorCode = (XmlParseErrorCode)reader.ReadCompressedUInt();
 }
开发者ID:riversky,项目名称:roslyn,代码行数:5,代码来源:XmlSyntaxDiagnosticInfo.cs

示例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();
                }
            }
        }
开发者ID:riversky,项目名称:roslyn,代码行数:20,代码来源:DiagnosticInfo.cs

示例5: XmlSyntaxDiagnosticInfo

 private XmlSyntaxDiagnosticInfo(ObjectReader reader)
     : base(reader)
 {
     _xmlErrorCode = (XmlParseErrorCode)reader.ReadCompressedUInt();
 }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:5,代码来源:XmlSyntaxDiagnosticInfo.cs


注:本文中的Roslyn.Utilities.ObjectReader.ReadCompressedUInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。