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


C# ObjectWriter.WriteBoolean方法代码示例

本文整理汇总了C#中Roslyn.Utilities.ObjectWriter.WriteBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectWriter.WriteBoolean方法的具体用法?C# ObjectWriter.WriteBoolean怎么用?C# ObjectWriter.WriteBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Roslyn.Utilities.ObjectWriter的用法示例。


在下文中一共展示了ObjectWriter.WriteBoolean方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WriteTo

 public void WriteTo(ObjectWriter writer)
 {
     writer.WriteString(SerializationFormat);
     writer.WriteBoolean(_isCaseSensitive);
     writer.WriteInt32(_hashFunctionCount);
     _bitArray.WriteTo(writer);
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:7,代码来源:BloomFilter_Serialization.cs

示例2: WriteTo

        public override void WriteTo(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken)
        {
            WriteCompilationOptionsTo(options, writer, cancellationToken);

            var csharpOptions = (CSharpCompilationOptions)options;
            writer.WriteValue(csharpOptions.Usings.ToArray());
            writer.WriteBoolean(csharpOptions.AllowUnsafe);
        }
开发者ID:jkotas,项目名称:roslyn,代码行数:8,代码来源:CSharpOptionsSerializationService.cs

示例3: SerializeDocumentSnapshotInfo

        public void SerializeDocumentSnapshotInfo(DocumentChecksumObjectInfo info, ObjectWriter writer, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();

            SerializeDocumentId(info.Id, writer, cancellationToken);

            writer.WriteString(info.Name);
            writer.WriteValue(info.Folders.ToArray());
            writer.WriteInt32((int)info.SourceCodeKind);
            writer.WriteString(info.FilePath);
            writer.WriteBoolean(info.IsGenerated);
        }
开发者ID:Rickinio,项目名称:roslyn,代码行数:12,代码来源:Serializer_Asset.cs

示例4: WriteCompilationOptionsTo

        protected void WriteCompilationOptionsTo(CompilationOptions options, ObjectWriter writer, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();

            writer.WriteInt32((int)options.OutputKind);
            writer.WriteBoolean(options.ReportSuppressedDiagnostics);
            writer.WriteString(options.ModuleName);
            writer.WriteString(options.MainTypeName);
            writer.WriteString(options.ScriptClassName);
            writer.WriteInt32((int)options.OptimizationLevel);
            writer.WriteBoolean(options.CheckOverflow);

            // REVIEW: is it okay this being not part of snapshot?
            writer.WriteString(options.CryptoKeyContainer);
            writer.WriteString(options.CryptoKeyFile);

            writer.WriteValue(options.CryptoPublicKey.ToArray());
            writer.WriteBoolean(options.DelaySign.HasValue);
            if (options.DelaySign.HasValue)
            {
                writer.WriteBoolean(options.DelaySign.Value);
            }

            writer.WriteInt32((int)options.Platform);
            writer.WriteInt32((int)options.GeneralDiagnosticOption);

            writer.WriteInt32(options.WarningLevel);

            // REVIEW: I don't think there is a guarantee on ordering of elements in the immutable dictionary.
            //         unfortunately, we need to sort them to make it deterministic
            writer.WriteInt32(options.SpecificDiagnosticOptions.Count);
            foreach (var kv in options.SpecificDiagnosticOptions.OrderBy(o => o.Key))
            {
                writer.WriteString(kv.Key);
                writer.WriteInt32((int)kv.Value);
            }

            writer.WriteBoolean(options.ConcurrentBuild);
            writer.WriteBoolean(options.Deterministic);
            writer.WriteBoolean(options.PublicSign);

            // REVIEW: What should I do with these. we probably need to implement either out own one
            //         or somehow share these as service....
            //
            // XmlReferenceResolver xmlReferenceResolver
            // SourceReferenceResolver sourceReferenceResolver
            // MetadataReferenceResolver metadataReferenceResolver
            // AssemblyIdentityComparer assemblyIdentityComparer
            // StrongNameProvider strongNameProvider
        }
开发者ID:Rickinio,项目名称:roslyn,代码行数:50,代码来源:AbstractOptionsSerializationService.cs

示例5: WriteTo

            public void WriteTo(ObjectWriter writer)
            {
                Id.WriteTo(writer);

                // TODO: figure out a way to send version info over as well
                // info.Version.WriteTo(writer);

                writer.WriteString(Name);
                writer.WriteString(AssemblyName);
                writer.WriteString(Language);
                writer.WriteString(FilePath);
                writer.WriteString(OutputFilePath);
                writer.WriteBoolean(IsSubmission);
                writer.WriteBoolean(HasAllInformation);

                // TODO: once CompilationOptions, ParseOptions, ProjectReference, MetadataReference, AnalyzerReference supports
                //       serialization, we should include those here as well.
            }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:18,代码来源:ProjectInfo.cs

示例6: WriteTo

        private void WriteTo(MetadataReferenceProperties properties, ObjectWriter writer, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();

            writer.WriteInt32((int)properties.Kind);
            writer.WriteValue(properties.Aliases.ToArray());
            writer.WriteBoolean(properties.EmbedInteropTypes);
        }
开发者ID:natidea,项目名称:roslyn,代码行数:8,代码来源:AbstractReferenceSerializationService.cs

示例7: WriteTo

        private void WriteTo(Stream stream, ImmutableArray<DiagnosticData> items, CancellationToken cancellationToken)
        {
            using (var writer = new ObjectWriter(stream, cancellationToken: cancellationToken))
            {
                writer.WriteInt32(FormatVersion);

                AnalyzerVersion.WriteTo(writer);
                Version.WriteTo(writer);

                writer.WriteInt32(items.Length);

                foreach (var item in items)
                {
                    cancellationToken.ThrowIfCancellationRequested();

                    writer.WriteString(item.Id);
                    writer.WriteString(item.Category);

                    writer.WriteString(item.Message);
                    writer.WriteString(item.ENUMessageForBingSearch);
                    writer.WriteString(item.Title);
                    writer.WriteString(item.Description);
                    writer.WriteString(item.HelpLink);
                    writer.WriteInt32((int)item.Severity);
                    writer.WriteInt32((int)item.DefaultSeverity);
                    writer.WriteBoolean(item.IsEnabledByDefault);
                    writer.WriteBoolean(item.IsSuppressed);
                    writer.WriteInt32(item.WarningLevel);

                    if (item.HasTextSpan)
                    {
                        // document state
                        writer.WriteInt32(item.TextSpan.Start);
                        writer.WriteInt32(item.TextSpan.Length);
                    }
                    else
                    {
                        // project state
                        writer.WriteInt32(0);
                        writer.WriteInt32(0);
                    }

                    WriteTo(writer, item.DataLocation, cancellationToken);
                    WriteTo(writer, item.AdditionalLocations, cancellationToken);

                    writer.WriteInt32(item.CustomTags.Count);
                    foreach (var tag in item.CustomTags)
                    {
                        writer.WriteString(tag);
                    }

                    writer.WriteInt32(item.Properties.Count);
                    foreach (var property in item.Properties)
                    {
                        writer.WriteString(property.Key);
                        writer.WriteString(property.Value);
                    }
                }
            }
        }
开发者ID:RoryVL,项目名称:roslyn,代码行数:60,代码来源:DiagnosticDataSerializer.cs

示例8: SerializeProjectReference

        public void SerializeProjectReference(ProjectReference reference, ObjectWriter writer, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();

            reference.ProjectId.WriteTo(writer);
            writer.WriteValue(reference.Aliases.ToArray());
            writer.WriteBoolean(reference.EmbedInteropTypes);
        }
开发者ID:jkotas,项目名称:roslyn,代码行数:8,代码来源:Serializer_Asset.cs

示例9: WriteTo

            public void WriteTo(ObjectWriter writer)
            {
                Id.WriteTo(writer);

                writer.WriteString(Name);
                writer.WriteValue(Folders.ToArray());
                writer.WriteInt32((int)SourceCodeKind);
                writer.WriteString(FilePath);
                writer.WriteBoolean(IsGenerated);
            }
开发者ID:jkotas,项目名称:roslyn,代码行数:10,代码来源:DocumentInfo.cs

示例10: WriteTo

        protected virtual void WriteTo(ObjectWriter writer)
        {
            writer.WriteValue(this.messageProvider);
            writer.WriteCompressedUInt((uint)this.errorCode);
            writer.WriteBoolean(this.isWarningAsError);

            int count = (this.arguments != null) ? arguments.Length : 0;
            writer.WriteCompressedUInt((uint)count);

            if (count > 0)
            {
                foreach (var arg in this.arguments)
                {
                    writer.WriteString(arg.ToString());
                }
            }
        }
开发者ID:riversky,项目名称:roslyn,代码行数:17,代码来源:DiagnosticInfo.cs

示例11: WriteTo

        public void WriteTo(ObjectWriter writer)
        {
            writer.WriteString(SerializationFormat);
            _version.WriteTo(writer);

            writer.WriteInt32(_nodes.Count);
            foreach (var node in _nodes)
            {
                writer.WriteString(node.Name);
                writer.WriteInt32(node.ParentIndex);
            }

            if (_lazySpellChecker.IsValueCreated)
            {
                writer.WriteBoolean(true);
                _lazySpellChecker.Value.WriteTo(writer);
            }
            else
            {
                writer.WriteBoolean(false);
            }
        }
开发者ID:braegelno5,项目名称:roslyn,代码行数:22,代码来源:SymbolTreeInfo_Serialization.cs


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