本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例7: CreateTrackingPoint
public ITrackingPoint CreateTrackingPoint(int position, PointTrackingMode trackingMode, TrackingFidelityMode trackingFidelity)
{
throw new NotImplementedException();
}
示例8: WithEndTrackingMode
public ReplSpan WithEndTrackingMode(PointTrackingMode endTrackingMode)
{
return new ReplSpan(((CustomTrackingSpan)this.Span).WithEndTrackingMode(endTrackingMode), this.Kind);
}
示例9: MapUpToBuffer
public SnapshotPoint? MapUpToBuffer(SnapshotPoint point, PointTrackingMode trackingMode, PositionAffinity affinity, ITextBuffer targetBuffer) {
return point;
}
示例10: CreateTrackingPoint
public ITrackingPoint CreateTrackingPoint(int position, PointTrackingMode trackingMode, TrackingFidelityMode trackingFidelity) =>
Version.CreateTrackingPoint(position, trackingMode, trackingFidelity);
示例11: MapDownToBuffer
public SnapshotPoint? MapDownToBuffer(SnapshotPoint position, PointTrackingMode trackingMode, ITextBuffer targetBuffer, PositionAffinity affinity) {
throw new NotImplementedException();
}
示例12: MapDownToInsertionPoint
public SnapshotPoint? MapDownToInsertionPoint(SnapshotPoint position, PointTrackingMode trackingMode, Predicate<ITextSnapshot> match) {
throw new NotImplementedException();
}
示例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;
}
示例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);
}
示例15: CreateMappingPoint
public IMappingPoint CreateMappingPoint(SnapshotPoint point, PointTrackingMode trackingMode) {
if (point.Snapshot == null)
throw new ArgumentException();
return new MappingPoint(this, point, trackingMode);
}