diff options
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/ISegment.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/ISegment.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/ISegment.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/ISegment.cs index 1de34d5f24..5eb3880767 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/ISegment.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.Text/ISegment.cs @@ -1,4 +1,4 @@ -// +// // ISegment.cs // // Author: @@ -27,7 +27,7 @@ using System; using System.Collections.Generic; namespace MonoDevelop.Core.Text -{ +{
/// <summary> /// An (Offset,Length)-pair. /// </summary> @@ -49,8 +49,8 @@ namespace MonoDevelop.Core.Text /// </summary> /// <remarks>EndOffset = Offset + Length;</remarks> int EndOffset { get; } - } - + }
+
/// <summary> /// An (Offset, Length) pair representing a text span. /// </summary> @@ -225,8 +225,8 @@ namespace MonoDevelop.Core.Text { return string.Format ("[TextSegment: Offset={0}, Length={1}]", Offset, Length); } - } - + }
+
/// <summary> /// An abstract implementation of the ISegment (Offset, Length) pair representing a text span. /// </summary> @@ -332,9 +332,9 @@ namespace MonoDevelop.Core.Text { return string.Format ("[AbstractSegment: Offset={0}, Length={1}]", Offset, Length); } - } - - + }
+
+
/// <summary> /// Extension methods for <see cref="ISegment"/>. /// </summary> @@ -396,8 +396,9 @@ namespace MonoDevelop.Core.Text int overlapStart = Math.Max (segment.Offset, other.Offset); int overlapEnd = Math.Min (segment.EndOffset, other.EndOffset); return overlapStart < overlapEnd; - } - + }
+
+ [Obsolete ("Use the Microsoft.VisualStudio.Text APIs")] public static ISegment AdjustSegment (this ISegment segment, TextChangeEventArgs args) { if (segment == null) @@ -405,8 +406,9 @@ namespace MonoDevelop.Core.Text var newStartOffset = args.GetNewOffset (segment.Offset); var newEndOffset = args.GetNewOffset (segment.EndOffset); return new TextSegment (newStartOffset, newEndOffset - newStartOffset); - } - + }
+
+ [Obsolete ("Use the Microsoft.VisualStudio.Text APIs")] public static IEnumerable<ISegment> AdjustSegments (this IEnumerable<ISegment> segments, TextChangeEventArgs args) { if (segments == null) |