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/TextModel/BufferFactoryService.cs | |
parent | cf974b266fb428d846e2e16a25a4eeb8f635c26f (diff) |
Updating to VS-Platform 15.8.519 (29d85337c7d2af248a692fd65ac37b444551e4cf).
Diffstat (limited to 'src/Text/Impl/TextModel/BufferFactoryService.cs')
-rw-r--r-- | src/Text/Impl/TextModel/BufferFactoryService.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Text/Impl/TextModel/BufferFactoryService.cs b/src/Text/Impl/TextModel/BufferFactoryService.cs index 975cbf0..5ae8b2f 100644 --- a/src/Text/Impl/TextModel/BufferFactoryService.cs +++ b/src/Text/Impl/TextModel/BufferFactoryService.cs @@ -149,7 +149,7 @@ namespace Microsoft.VisualStudio.Text.Implementation { if (contentType == null) { - throw new ArgumentNullException("contentType"); + throw new ArgumentNullException(nameof(contentType)); } return Make(contentType, StringRebuilder.Empty, false); } @@ -163,7 +163,7 @@ namespace Microsoft.VisualStudio.Text.Implementation { if (contentType == null) { - throw new ArgumentNullException("contentType"); + throw new ArgumentNullException(nameof(contentType)); } StringRebuilder content = StringRebuilderFromSnapshotSpan(span); @@ -191,11 +191,11 @@ namespace Microsoft.VisualStudio.Text.Implementation { if (text == null) { - throw new ArgumentNullException("text"); + throw new ArgumentNullException(nameof(text)); } if (contentType == null) { - throw new ArgumentNullException("contentType"); + throw new ArgumentNullException(nameof(contentType)); } return Make(contentType, StringRebuilder.Create(text), spurnGroup); } @@ -204,11 +204,11 @@ namespace Microsoft.VisualStudio.Text.Implementation { if (reader == null) { - throw new ArgumentNullException("reader"); + throw new ArgumentNullException(nameof(reader)); } if (contentType == null) { - throw new ArgumentNullException("contentType"); + throw new ArgumentNullException(nameof(contentType)); } if (length > int.MaxValue) { @@ -217,7 +217,7 @@ namespace Microsoft.VisualStudio.Text.Implementation bool hasConsistentLineEndings; int longestLineLength; - StringRebuilder content = TextImageLoader.Load(reader, length, traceId, out hasConsistentLineEndings, out longestLineLength); + StringRebuilder content = TextImageLoader.Load(reader, length, out hasConsistentLineEndings, out longestLineLength); ITextBuffer buffer = Make(contentType, content, false); if (!hasConsistentLineEndings) @@ -286,7 +286,7 @@ namespace Microsoft.VisualStudio.Text.Implementation bool hasConsistentLineEndings; int longestLineLength; - return CachingTextImage.Create(TextImageLoader.Load(reader, length, string.Empty, out hasConsistentLineEndings, out longestLineLength), null); + return CachingTextImage.Create(TextImageLoader.Load(reader, length, out hasConsistentLineEndings, out longestLineLength), null); } public ITextImage CreateTextImage(MemoryMappedFile source) @@ -318,11 +318,11 @@ namespace Microsoft.VisualStudio.Text.Implementation // projectionEditResolver is allowed to be null. if (trackingSpans == null) { - throw new ArgumentNullException("trackingSpans"); + throw new ArgumentNullException(nameof(trackingSpans)); } if (contentType == null) { - throw new ArgumentNullException("contentType"); + throw new ArgumentNullException(nameof(contentType)); } IProjectionBuffer buffer = new ProjectionBuffer(this, projectionEditResolver, contentType, trackingSpans, _differenceService, _textDifferencingSelectorService.DefaultTextDifferencingService, options, _guardedOperations); @@ -337,7 +337,7 @@ namespace Microsoft.VisualStudio.Text.Implementation // projectionEditResolver is allowed to be null. if (trackingSpans == null) { - throw new ArgumentNullException("trackingSpans"); + throw new ArgumentNullException(nameof(trackingSpans)); } IProjectionBuffer buffer = @@ -354,15 +354,15 @@ namespace Microsoft.VisualStudio.Text.Implementation // projectionEditResolver is allowed to be null. if (exposedSpans == null) { - throw new ArgumentNullException("exposedSpans"); + throw new ArgumentNullException(nameof(exposedSpans)); } if (exposedSpans.Count == 0) { - throw new ArgumentOutOfRangeException("exposedSpans"); // really? + throw new ArgumentOutOfRangeException(nameof(exposedSpans)); // really? } if (contentType == null) { - throw new ArgumentNullException("contentType"); + throw new ArgumentNullException(nameof(contentType)); } if (exposedSpans[0].Snapshot != exposedSpans[0].Snapshot.TextBuffer.CurrentSnapshot) |