当前位置: 首页>>代码示例>>C#>>正文


C# SpanTrackingMode类代码示例

本文整理汇总了C#中SpanTrackingMode的典型用法代码示例。如果您正苦于以下问题:C# SpanTrackingMode类的具体用法?C# SpanTrackingMode怎么用?C# SpanTrackingMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SpanTrackingMode类属于命名空间,在下文中一共展示了SpanTrackingMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateTrackingSpan

		public ITrackingSpan CreateTrackingSpan(Span span, SpanTrackingMode trackingMode, TrackingFidelityMode trackingFidelity) {
			if (trackingMode == SpanTrackingMode.Custom)
				throw new NotSupportedException();
			if (trackingFidelity == TrackingFidelityMode.UndoRedo)
				throw new NotSupportedException();
			return new TrackingSpan(this, span, trackingMode, trackingFidelity);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:7,代码来源:TextVersion.cs

示例2: MappingSpan

		public MappingSpan(IBufferGraph bufferGraph, SnapshotSpan snapshotSpan, SpanTrackingMode trackingMode) {
			if (bufferGraph == null)
				throw new ArgumentNullException(nameof(bufferGraph));
			if (snapshotSpan.Snapshot == null)
				throw new ArgumentException();
			BufferGraph = bufferGraph;
			this.snapshotSpan = snapshotSpan;
			spanTrackingMode = trackingMode;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:9,代码来源:MappingSpan.cs

示例3: TrackingSpanMock

        public TrackingSpanMock(ITextBuffer textBuffer, Span span, SpanTrackingMode trackingMode, TrackingFidelityMode trackingFidelity)
        {
            _span = span;

            TextBuffer = textBuffer;
            TrackingMode = trackingMode;
            TrackingFidelity = trackingFidelity;

            var mock = textBuffer as TextBufferMock;
            mock.BeforeChanged += OnBeforeTextBufferChanged;
        }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:11,代码来源:TrackingSpanMock.cs

示例4: TrackingSpan

		public TrackingSpan(ITextVersion textVersion, Span span, SpanTrackingMode trackingMode, TrackingFidelityMode trackingFidelity) {
			if (textVersion == null)
				throw new ArgumentNullException(nameof(textVersion));
			if ((uint)span.End > (uint)textVersion.Length)
				throw new ArgumentOutOfRangeException(nameof(span));
			TextBuffer = textVersion.TextBuffer;
			TrackingFidelity = trackingFidelity;
			TrackingMode = trackingMode;
			this.textVersion = textVersion;
			this.span = span;
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:11,代码来源:TrackingSpan.cs

示例5: MapTo

        private static SnapshotSpan MapTo(IBufferGraphFactoryService bufferGraphFactoryService, SnapshotSpan span, ITextSnapshot snapshot, SpanTrackingMode spanTrackingMode)
        {
            if (span.Snapshot.TextBuffer == snapshot.TextBuffer)
                return span.TranslateTo(snapshot, spanTrackingMode);

            var graph = bufferGraphFactoryService.CreateBufferGraph(snapshot.TextBuffer);
            var mappingSpan = graph.CreateMappingSpan(span, spanTrackingMode);
            var mapped = mappingSpan.GetSpans(snapshot);
            if (mapped.Count == 1)
                return mapped[0];

            return new SnapshotSpan(mapped[0].Start, mapped[mapped.Count - 1].End);
        }
开发者ID:davidlee80,项目名称:HlslTools,代码行数:13,代码来源:NavigationExtensions.cs

示例6: VersionedTextSpan

		/// <summary>
		/// Initializes a new instance of the <see cref="VersionedTextSpan"/> class.
		/// </summary>
		/// <exception cref="ArgumentNullException">
		/// <para><paramref name="buffer"/> is <see langword="null"/>.</para>
		/// -or-
		/// <para><paramref name="span"/> is <see langword="null"/>.</para>
		/// </exception>
		public VersionedTextSpan(TextBuffer buffer, Span span, SpanTrackingMode trackingMode)
		{
			if (buffer == null)
			{
				throw new ArgumentNullException("buffer");
			}

			if (span == null)
			{
				throw new ArgumentNullException("span");
			}

			this.Construct(buffer, buffer.Version, span.Start, span.Length, trackingMode);
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:22,代码来源:VersionedTextSpan.cs

示例7: MockTrackingSpan

 public MockTrackingSpan(MockTextSnapshot snapshot, int start, int length, SpanTrackingMode trackingMode = SpanTrackingMode.EdgeExclusive) {
     _start = start;
     _length = length;
     _snapshot = snapshot;
     _trackingMode = trackingMode;
     switch(_trackingMode) {
         case SpanTrackingMode.EdgeExclusive:
             _startPoint = new MockTrackingPoint(snapshot, start, PointTrackingMode.Positive);
             _endPoint = new MockTrackingPoint(snapshot, start + length, PointTrackingMode.Negative);
             break;
         case SpanTrackingMode.EdgeInclusive:
             _startPoint = new MockTrackingPoint(snapshot, start, PointTrackingMode.Negative);
             _endPoint = new MockTrackingPoint(snapshot, start + length, PointTrackingMode.Positive);
             break;
         case SpanTrackingMode.EdgeNegative:
             _startPoint = new MockTrackingPoint(snapshot, start, PointTrackingMode.Negative);
             _endPoint = new MockTrackingPoint(snapshot, start + length, PointTrackingMode.Negative);
             break;
         case SpanTrackingMode.EdgePositive:
             _startPoint = new MockTrackingPoint(snapshot, start, PointTrackingMode.Positive);
             _endPoint = new MockTrackingPoint(snapshot, start + length, PointTrackingMode.Positive);
             break;
     }
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:24,代码来源:MockTrackingSpan.cs

示例8: MapUpToSnapshot

 public NormalizedSnapshotSpanCollection MapUpToSnapshot(SnapshotSpan span, SpanTrackingMode trackingMode, ITextSnapshot targetSnapshot) {
     throw new NotImplementedException();
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:3,代码来源:MockBufferGraph.cs

示例9: CreateTrackingSpan

 public ITrackingSpan CreateTrackingSpan(Span span, SpanTrackingMode trackingMode) {
     return new MockTrackingSpan(this, span.Start, span.Length);
 }
开发者ID:ReedCopsey,项目名称:VisualFSharpPowerTools,代码行数:3,代码来源:MockTextSnapshot.cs

示例10: CreateTrackingSpan

 public ITrackingSpan CreateTrackingSpan(int start, int length, SpanTrackingMode trackingMode)
 {
     return TextBuffer.CurrentSnapshot.CreateTrackingSpan(start, length, trackingMode);
 }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:4,代码来源:TextVersionMock.cs

示例11: CreateTrackingSpan

		public ITrackingSpan CreateTrackingSpan(int start, int length, SpanTrackingMode trackingMode, TrackingFidelityMode trackingFidelity) =>
			Version.CreateTrackingSpan(start, length, trackingMode, trackingFidelity);
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:2,代码来源:TextSnapshot.cs

示例12: MapDownToFirstMatch

 public NormalizedSnapshotSpanCollection MapDownToFirstMatch(SnapshotSpan span, SpanTrackingMode trackingMode, Predicate<ITextSnapshot> match) {
     throw new NotImplementedException();
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:3,代码来源:MockBufferGraph.cs

示例13: CreateMappingSpan

 public IMappingSpan CreateMappingSpan(SnapshotSpan span, SpanTrackingMode trackingMode) {
     throw new NotImplementedException();
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:3,代码来源:MockBufferGraph.cs

示例14: Construct

		private void Construct(TextBuffer buffer, ITextVersion version, Int32 start, Int32 length, SpanTrackingMode trackingMode)
		{
			Int32 lengthOfVersion = buffer.GetLengthOfVersion(version);
			if ((start < 0) || (start > lengthOfVersion))
			{
				throw new ArgumentOutOfRangeException("start");
			}
			if ((length < 0) || ((start + length) > lengthOfVersion))
			{
				throw new ArgumentOutOfRangeException("length");
			}
			_buffer = buffer;
			_version = version;
			_start = start;
			_length = length;
			_trackingMode = trackingMode;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:17,代码来源:VersionedTextSpan.cs

示例15: MapDownToBuffer

 public NormalizedSnapshotSpanCollection MapDownToBuffer(SnapshotSpan span, SpanTrackingMode trackingMode, ITextBuffer targetBuffer) {
     throw new NotImplementedException();
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:3,代码来源:MockBufferGraph.cs


注:本文中的SpanTrackingMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。