From 2ad06aa8720212c8986dba45269e27e46c9aed88 Mon Sep 17 00:00:00 2001 From: vsadov Date: Mon, 16 Apr 2018 13:59:42 -0700 Subject: [PATCH] PR feedback --- src/Compilers/Core/Portable/Diagnostic/DiagnosticInfo.cs | 2 +- .../Core/Portable/Diagnostic/LocalizableResourceString.cs | 2 +- src/Compilers/Core/Portable/Serialization/IObjectWritable.cs | 4 ++-- .../Core/Portable/Serialization/ObjectBinderSnapshot.cs | 2 +- src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb | 2 +- .../VisualBasic/Portable/Syntax/InternalSyntax/SyntaxToken.vb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Compilers/Core/Portable/Diagnostic/DiagnosticInfo.cs b/src/Compilers/Core/Portable/Diagnostic/DiagnosticInfo.cs index 885f8546eb8..666c7b4f198 100644 --- a/src/Compilers/Core/Portable/Diagnostic/DiagnosticInfo.cs +++ b/src/Compilers/Core/Portable/Diagnostic/DiagnosticInfo.cs @@ -138,7 +138,7 @@ internal DiagnosticInfo GetInstanceWithSeverity(DiagnosticSeverity severity) #region Serialization - bool IObjectWritable.ShouldReuseInSerialization => true; + bool IObjectWritable.ShouldReuseInSerialization => false; void IObjectWritable.WriteTo(ObjectWriter writer) { diff --git a/src/Compilers/Core/Portable/Diagnostic/LocalizableResourceString.cs b/src/Compilers/Core/Portable/Diagnostic/LocalizableResourceString.cs index 11ed98821f0..74490660180 100644 --- a/src/Compilers/Core/Portable/Diagnostic/LocalizableResourceString.cs +++ b/src/Compilers/Core/Portable/Diagnostic/LocalizableResourceString.cs @@ -93,7 +93,7 @@ private LocalizableResourceString(ObjectReader reader) } } - bool IObjectWritable.ShouldReuseInSerialization => true; + bool IObjectWritable.ShouldReuseInSerialization => false; void IObjectWritable.WriteTo(ObjectWriter writer) { diff --git a/src/Compilers/Core/Portable/Serialization/IObjectWritable.cs b/src/Compilers/Core/Portable/Serialization/IObjectWritable.cs index de8a48b47a0..3a331c4ff43 100644 --- a/src/Compilers/Core/Portable/Serialization/IObjectWritable.cs +++ b/src/Compilers/Core/Portable/Serialization/IObjectWritable.cs @@ -11,8 +11,8 @@ internal interface IObjectWritable void WriteTo(ObjectWriter writer); /// - /// Returns `true` when the same instance could be used more than once. - /// Instances that return "false" should not be tracked or the purpose + /// Returns 'true' when the same instance could be used more than once. + /// Instances that return 'false' should not be tracked for the purpose /// of de-duplication while serializing/deserializing. /// bool ShouldReuseInSerialization { get; } diff --git a/src/Compilers/Core/Portable/Serialization/ObjectBinderSnapshot.cs b/src/Compilers/Core/Portable/Serialization/ObjectBinderSnapshot.cs index 333ff98863b..8ccf8c7bdef 100644 --- a/src/Compilers/Core/Portable/Serialization/ObjectBinderSnapshot.cs +++ b/src/Compilers/Core/Portable/Serialization/ObjectBinderSnapshot.cs @@ -6,7 +6,7 @@ namespace Roslyn.Utilities { - internal struct ObjectBinderSnapshot + internal readonly struct ObjectBinderSnapshot { private readonly Dictionary _typeToIndex; private readonly ImmutableArray _types; diff --git a/src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb b/src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb index 3c4d9fa05df..939c74ade92 100644 --- a/src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb +++ b/src/Compilers/VisualBasic/Portable/Errors/MessageProvider.vb @@ -18,7 +18,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic Private Sub New() End Sub - Private ReadOnly Property IsReausable As Boolean Implements IObjectWritable.ShouldReuseInSerialization + Private ReadOnly Property IObjectWritable_ShouldReuseInSerialization As Boolean Implements IObjectWritable.ShouldReuseInSerialization Get Return True End Get diff --git a/src/Compilers/VisualBasic/Portable/Syntax/InternalSyntax/SyntaxToken.vb b/src/Compilers/VisualBasic/Portable/Syntax/InternalSyntax/SyntaxToken.vb index 18814ac9498..d0efaa4704c 100644 --- a/src/Compilers/VisualBasic/Portable/Syntax/InternalSyntax/SyntaxToken.vb +++ b/src/Compilers/VisualBasic/Portable/Syntax/InternalSyntax/SyntaxToken.vb @@ -89,7 +89,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax Me._trailingTrivia = DirectCast(reader.ReadValue(), GreenNode) End Sub - Private ReadOnly Property IsReausable As Boolean Implements IObjectWritable.ShouldReuseInSerialization + Private ReadOnly Property IObjectWritable_ShouldReuseInSerialization As Boolean Implements IObjectWritable.ShouldReuseInSerialization Get Return ShouldCacheTriviaInfo(_leadingTrivia, _trailingTrivia) End Get -- GitLab