diff options
author | Kirill Osenkov <github@osenkov.com> | 2018-08-15 21:13:16 +0300 |
---|---|---|
committer | Kirill Osenkov <github@osenkov.com> | 2018-08-15 21:13:16 +0300 |
commit | b407d9744a34fd4647cf3e99068a28d728fd65a2 (patch) | |
tree | e6d6cef915f32dec4f2d16b1868045143deb589f /src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs | |
parent | cf974b266fb428d846e2e16a25a4eeb8f635c26f (diff) |
Updating to VS-Platform 15.8.519 (29d85337c7d2af248a692fd65ac37b444551e4cf).
Diffstat (limited to 'src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs')
-rw-r--r-- | src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs b/src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs index d913c0d..9c8086a 100644 --- a/src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs +++ b/src/Text/Impl/EditorOperations/TextTransactionMergePolicy.cs @@ -48,12 +48,12 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation // Validate if (newTransaction == null) { - throw new ArgumentNullException("newTransaction"); + throw new ArgumentNullException(nameof(newTransaction)); } if (oldTransaction == null) { - throw new ArgumentNullException("oldTransaction"); + throw new ArgumentNullException(nameof(oldTransaction)); } TextTransactionMergePolicy oldPolicy = oldTransaction.MergePolicy as TextTransactionMergePolicy; @@ -71,7 +71,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation } // Only merge text transactions that have the same description - if (newTransaction.Description != oldTransaction.Description) + if (!string.Equals(newTransaction.Description, oldTransaction.Description, StringComparison.Ordinal)) { return false; } @@ -92,9 +92,9 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation public void PerformTransactionMerge(ITextUndoTransaction existingTransaction, ITextUndoTransaction newTransaction) { if (existingTransaction == null) - throw new ArgumentNullException("existingTransaction"); + throw new ArgumentNullException(nameof(existingTransaction)); if (newTransaction == null) - throw new ArgumentNullException("newTransaction"); + throw new ArgumentNullException(nameof(newTransaction)); // Remove trailing AfterTextBufferChangeUndoPrimitive from previous transaction and skip copying // initial BeforeTextBufferChangeUndoPrimitive from newTransaction, as they are unnecessary. @@ -128,7 +128,7 @@ namespace Microsoft.VisualStudio.Text.Operations.Implementation { if (other == null) { - throw new ArgumentNullException("other"); + throw new ArgumentNullException(nameof(other)); } // Only merge transaction if they are both a text transaction |