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


C# PointTrackingMode类代码示例

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


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

示例1: TrackingPointMock

 public TrackingPointMock(ITextBuffer textBuffer, int position, PointTrackingMode trackingMode, TrackingFidelityMode trackingFidelity)
 {
     _position = position;
     
     TextBuffer = textBuffer;
     TrackingFidelity = trackingFidelity;
     TrackingMode = trackingMode;
 }
开发者ID:AlexanderSher,项目名称:RTVS-Old,代码行数:8,代码来源:TrackingPointMock.cs

示例2: MappingPoint

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

示例3: TrackingPoint

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

示例4: MapDownToSnapshot

		public SnapshotPoint? MapDownToSnapshot(SnapshotPoint position, PointTrackingMode trackingMode, ITextSnapshot targetSnapshot, PositionAffinity affinity) {
			if (position.Snapshot == null)
				throw new ArgumentException();
			if (targetSnapshot == null)
				throw new ArgumentNullException(nameof(targetSnapshot));

			var res = MapDownToBuffer(position, trackingMode, targetSnapshot.TextBuffer, affinity);
			if (res == null)
				return null;
			return res.Value.TranslateTo(targetSnapshot, trackingMode);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:11,代码来源:BufferGraph.cs

示例5: MapDownToBuffer

		public SnapshotPoint? MapDownToBuffer(SnapshotPoint position, PointTrackingMode trackingMode, ITextBuffer targetBuffer, PositionAffinity affinity) {
			if (position.Snapshot == null)
				throw new ArgumentException();
			if (targetBuffer == null)
				throw new ArgumentNullException(nameof(targetBuffer));

			if (position.Snapshot.TextBuffer != TopBuffer)
				return null;
			if (TopBuffer != targetBuffer)
				return null;
			return position.TranslateTo(targetBuffer.CurrentSnapshot, trackingMode);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:12,代码来源:BufferGraph.cs

示例6: MapDownToInsertionPoint

 public SnapshotPoint? MapDownToInsertionPoint(SnapshotPoint position, PointTrackingMode trackingMode, Predicate<ITextSnapshot> match) {
     var snapshot = position.Snapshot;
     var buffer = snapshot.TextBuffer;
     int pos = position.TranslateTo(snapshot, trackingMode);
     while (!match(snapshot)) {
         var projBuffer = buffer as IProjectionBufferBase;
         if (projBuffer == null) {
             return null;
         }
         var projSnapshot = projBuffer.CurrentSnapshot;
         if (projSnapshot.SourceSnapshots.Count == 0) {
             return null;
         }
         var pt = projSnapshot.MapToSourceSnapshot(pos);
         pos = pt.Position;
         snapshot = pt.Snapshot;
         buffer = snapshot.TextBuffer;
     }
     return new SnapshotPoint(snapshot, pos);
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:20,代码来源:MockBufferGraph.cs

示例7: CreateTrackingPoint

 public ITrackingPoint CreateTrackingPoint(int position, PointTrackingMode trackingMode, TrackingFidelityMode trackingFidelity)
 {
     throw new NotImplementedException();
 }
开发者ID:AngelPortal,项目名称:NBehave,代码行数:4,代码来源:MockTextSnapshot.cs

示例8: WithEndTrackingMode

 public ReplSpan WithEndTrackingMode(PointTrackingMode endTrackingMode)
 {
     return new ReplSpan(((CustomTrackingSpan)this.Span).WithEndTrackingMode(endTrackingMode), this.Kind);
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:4,代码来源:ReplInput.cs

示例9: MapUpToBuffer

 public SnapshotPoint? MapUpToBuffer(SnapshotPoint point, PointTrackingMode trackingMode, PositionAffinity affinity, ITextBuffer targetBuffer) {
     return point;
 }
开发者ID:Microsoft,项目名称:RTVS,代码行数:3,代码来源:BufferGraphMock.cs

示例10: CreateTrackingPoint

		public ITrackingPoint CreateTrackingPoint(int position, PointTrackingMode trackingMode, TrackingFidelityMode trackingFidelity) =>
			Version.CreateTrackingPoint(position, trackingMode, trackingFidelity);
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:2,代码来源:TextSnapshot.cs

示例11: MapDownToBuffer

 public SnapshotPoint? MapDownToBuffer(SnapshotPoint position, PointTrackingMode trackingMode, ITextBuffer targetBuffer, PositionAffinity affinity) {
     throw new NotImplementedException();
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:3,代码来源:MockBufferGraph.cs

示例12: MapDownToInsertionPoint

 public SnapshotPoint? MapDownToInsertionPoint(SnapshotPoint position, PointTrackingMode trackingMode, Predicate<ITextSnapshot> match) {
     throw new NotImplementedException();
 }
开发者ID:sramos30,项目名称:ntvsiot,代码行数:3,代码来源:MockBufferGraph.cs

示例13: MapUpToBuffer

 public SnapshotPoint? MapUpToBuffer(SnapshotPoint point, PointTrackingMode trackingMode, PositionAffinity affinity, ITextBuffer targetBuffer) {
     int position = 0;
     for (int i = 0; i < _buffers.Count; i++) {
         if (_buffers[i] == targetBuffer) {
             return new SnapshotPoint(point.Snapshot, position + point.Position);
         }
         position += _buffers[i].CurrentSnapshot.Length;
     }
     return null;
 }
开发者ID:omnimark,项目名称:PTVS,代码行数:10,代码来源:MockBufferGraph.cs

示例14: MapDownToFirstMatch

		public SnapshotPoint? MapDownToFirstMatch(SnapshotPoint position, PointTrackingMode trackingMode, Predicate<ITextSnapshot> match, PositionAffinity affinity) {
			if (position.Snapshot == null)
				throw new ArgumentException();
			if (match == null)
				throw new ArgumentNullException(nameof(match));

			if (position.Snapshot.TextBuffer != TopBuffer)
				return null;
			if (!match(TopBuffer.CurrentSnapshot))
				return null;
			return position.TranslateTo(TopBuffer.CurrentSnapshot, trackingMode);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:12,代码来源:BufferGraph.cs

示例15: CreateMappingPoint

		public IMappingPoint CreateMappingPoint(SnapshotPoint point, PointTrackingMode trackingMode) {
			if (point.Snapshot == null)
				throw new ArgumentException();
			return new MappingPoint(this, point, trackingMode);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:5,代码来源:BufferGraph.cs


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