Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vs-editor-api.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Def/TextData/Model/VersionedPosition.cs')
-rw-r--r--src/Text/Def/TextData/Model/VersionedPosition.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Def/TextData/Model/VersionedPosition.cs b/src/Text/Def/TextData/Model/VersionedPosition.cs
index 8f9e036..7b921b6 100644
--- a/src/Text/Def/TextData/Model/VersionedPosition.cs
+++ b/src/Text/Def/TextData/Model/VersionedPosition.cs
@@ -5,14 +5,19 @@
namespace Microsoft.VisualStudio.Text
{
using System;
+ using System.Diagnostics.CodeAnalysis;
/// <summary>
/// Describes a location in a specific <see cref="ITextImageVersion"/>.
/// </summary>
public struct VersionedPosition : IEquatable<VersionedPosition>
{
+
+#pragma warning disable CA1051 // Do not declare visible instance fields
+ [SuppressMessage("Microsoft.Security", "CA2104", Justification = "Type is readonly")]
public readonly ITextImageVersion Version;
public readonly int Position;
+#pragma warning restore CA1051 // Do not declare visible instance fields
public readonly static VersionedPosition Invalid = new VersionedPosition();
@@ -82,7 +87,7 @@ namespace Microsoft.VisualStudio.Text
{
return (this.Version == null)
? nameof(Invalid)
- : string.Format(System.Globalization.CultureInfo.CurrentCulture, "v{1}_{2}",
+ : string.Format(System.Globalization.CultureInfo.CurrentCulture, "v{0}_{1}",
this.Version.VersionNumber,
this.Position);
}