src\Framework\MS\Internal\Documents\TextBoxView.cs (81)
560return _visualChildren[index];
701int startOffset = Math.Min(_lineMetrics[_lineMetrics.Count-1].EndOffset, startPosition.Offset);
702int endOffset = Math.Min(_lineMetrics[_lineMetrics.Count - 1].EndOffset, endPosition.Offset);
720bool firstLinePartiallyCovered = _lineMetrics[firstLineIndex].Offset < startOffset ||
721_lineMetrics[firstLineIndex].EndOffset > endOffset;
722bool lastLinePartiallyCovered = _lineMetrics[lastLineIndex].Offset < startOffset ||
723_lineMetrics[lastLineIndex].EndOffset > endOffset;
745double contentOffset = GetContentOffset(_lineMetrics[lineIndex].Width, alignment);
746Rect rect = new Rect(contentOffset, lineIndex * _lineHeight, _lineMetrics[lineIndex].Width, _lineHeight);
749ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].EndOffset, LogicalDirection.Backward);
789nextLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex + linesMoved].Offset, LogicalDirection.Forward);
835if (position.Offset > _lineMetrics[lineIndex].Offset)
894if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == _lineMetrics[lineIndex].EndOffset &&
908else if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == _lineMetrics[lineIndex].Offset &&
957if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength == _lineMetrics[lineIndex].Offset)
990ITextPointer start = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset, LogicalDirection.Forward);
991ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength, LogicalDirection.Forward);
1111int lastValidOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
1123int newLastValidOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
1193LineRecord record = _lineMetrics[index];
1310ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[_lineMetrics.Count-1].EndOffset, LogicalDirection.Forward);
1578LineRecord metrics = _lineMetrics[lineIndex];
1668LineRecord record = _lineMetrics[index];
1732LineRecord metrics = _lineMetrics[lineIndex];
1885LineRecord metrics = _lineMetrics[lineIndex];
1960if (_visualChildren[i] == null || _visualChildren[i].DiscardOnArrange)
1962RemoveVisualChild(_visualChildren[i]);
1966_visualChildren[i] = _visualChildren[j];
1998RemoveVisualChild(_visualChildren[i]);
2045int startOffset = Math.Max(_lineMetrics[lineIndex].Offset, unclippedStartOffset);
2046int endOffset = Math.Min(_lineMetrics[lineIndex].EndOffset, unclippedEndOffset);
2053if (unclippedStartOffset == _lineMetrics[lineIndex].EndOffset)
2079Invariant.Assert(endOffset == _lineMetrics[lineIndex].Offset ||
2080endOffset == _lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength);
2098if (unclippedEndOffset >= _lineMetrics[lineIndex].EndOffset)
2104double contentOffset = GetContentOffset(_lineMetrics[lineIndex].Width, alignment);
2105Rect rect = new Rect(contentOffset + _lineMetrics[lineIndex].Width, lineIndex * _lineHeight, endOfParaGlyphWidth, _lineHeight);
2131int lineStartOffset = _lineMetrics[lineIndex].Offset;
2132int lineEndOffset = _lineMetrics[lineIndex].EndOffset;
2149if (unclippedStartOffset == _lineMetrics[lineIndex].EndOffset)
2161Invariant.Assert(endOffset == _lineMetrics[lineIndex].Offset ||
2162endOffset == _lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength);
2177if (unclippedEndOffset >= _lineMetrics[lineIndex].EndOffset)
2183double contentOffset = GetContentOffset(_lineMetrics[lineIndex].Width, alignment);
2184Rect rect = new Rect(contentOffset + _lineMetrics[lineIndex].Width, 0, endOfParaGlyphWidth, _lineHeight);
2239lineOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
2329if (range.StartIndex > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2349if (range.StartIndex > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2390_lineMetrics[i].Offset += delta;
2407lineOffset = _lineMetrics[lineIndex].Offset;
2447if (endOffset > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2450endOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
2464_lineMetrics[i].Offset += delta;
2481lineOffset = _lineMetrics[lineIndex].Offset;
2491(range.StartIndex > lineOffset || range.StartIndex + -delta < _lineMetrics[lineIndex].EndOffset))
2524int originalEndOffset = _lineMetrics[lineIndex].EndOffset;
2525lineOffset = _lineMetrics[lineIndex].Offset;
2538if (originalEndOffset != _lineMetrics[lineIndex].EndOffset)
2557lineOffset != _lineMetrics[lineIndex].Offset))
2560lineOffset >= _lineMetrics[lineIndex].EndOffset)
2579lineOffset + line.Length <= _lineMetrics[lineIndex].Offset)
2593Invariant.Assert(lineOffset < _lineMetrics[lineIndex].EndOffset);
2595var curLine = _lineMetrics[lineIndex];
2647desiredSize.Width = Math.Max(desiredSize.Width, _lineMetrics[i].Width);
2715_viewportLineVisuals[lineIndex - _viewportLineVisualsIndex + i] = oldLineVisuals[lineIndex - oldLineVisualsIndex + i];
2722if (oldLineVisuals[i] != null)
2724oldLineVisuals[i].DiscardOnArrange = true;
2730if (oldLineVisuals[i] != null)
2732oldLineVisuals[i].DiscardOnArrange = true;
2750lineVisual = _viewportLineVisuals[lineIndex - _viewportLineVisualsIndex];
2787_viewportLineVisuals[lineIndex - _viewportLineVisualsIndex] != null)
2790_viewportLineVisuals[lineIndex - _viewportLineVisualsIndex].DiscardOnArrange = true;
2817if (_viewportLineVisuals[start + i] != null)
2819_viewportLineVisuals[start + i].DiscardOnArrange = true;
2904_lineMetrics[_lineMetrics.Count - 1].EndOffset >= position.Offset;
2964int viewportStart = _lineMetrics[firstLineIndex].Offset;
2965int viewportEnd = _lineMetrics[lastLineIndex].EndOffset;
src\Framework\MS\Internal\PtsHost\PtsCache.cs (48)
216if (!_contextPool[index].InUse &&
217_contextPool[index].IsOptimalParagraphEnabled == ptsContext.IsOptimalParagraphEnabled)
227_contextPool[index].IsOptimalParagraphEnabled = ptsContext.IsOptimalParagraphEnabled;
228_contextPool[index].PtsHost = new PtsHost();
229_contextPool[index].PtsHost.Context = CreatePTSContext(index, textFormattingMode);
234if (_contextPool[index].IsOptimalParagraphEnabled)
236ptsContext.TextFormatter = _contextPool[index].TextFormatter;
240_contextPool[index].InUse = true;
241_contextPool[index].Owner = new WeakReference(ptsContext);
243return _contextPool[index].PtsHost;
291if (_contextPool[index].PtsHost == ptsHost)
297PTS.Validate(PTS.GetFloaterHandlerInfo(ref _contextPool[index].FloaterInit, pobjectinfo));
318if (_contextPool[index].PtsHost == ptsHost)
324PTS.Validate(PTS.GetTableObjHandlerInfo(ref _contextPool[index].TableobjInit, pobjectinfo));
367PtsContext ptsContext = _contextPool[index].Owner.Target as PtsContext;
370Invariant.Assert(_contextPool[index].PtsHost.Context == ptsContext.Context, "PTS Context mismatch.");
371_contextPool[index].Owner = new WeakReference(null);
372_contextPool[index].InUse = false;
378if (!_contextPool[index].InUse)
383Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid.");
384PTS.IgnoreError(PTS.DestroyDocContext(_contextPool[index].PtsHost.Context));
385Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid.");
386PTS.IgnoreError(PTS.DestroyInstalledObjectsInfo(_contextPool[index].InstalledObjects));
389if (_contextPool[index].TextPenaltyModule != null)
391_contextPool[index].TextPenaltyModule.Dispose();
442if (_contextPool[index].PtsHost.Context == ptsContext.Context)
444_contextPool[index].Owner = new WeakReference(null);
445_contextPool[index].InUse = false;
466if (!_contextPool[index].InUse)
468Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid.");
469PTS.Validate(PTS.DestroyDocContext(_contextPool[index].PtsHost.Context));
470Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid.");
471PTS.Validate(PTS.DestroyInstalledObjectsInfo(_contextPool[index].InstalledObjects));
474if (_contextPool[index].TextPenaltyModule != null)
476_contextPool[index].TextPenaltyModule.Dispose();
507ptsHost = _contextPool[index].PtsHost;
511InitInstalledObjectsInfo(ptsHost, ref _contextPool[index].SubtrackParaInfo, ref _contextPool[index].SubpageParaInfo, out installedObjects, out installedObjectsCount);
512_contextPool[index].InstalledObjects = installedObjects;
515InitGenericInfo(ptsHost, (IntPtr)(index + 1), installedObjects, installedObjectsCount, ref _contextPool[index].ContextInfo);
518InitFloaterObjInfo(ptsHost, ref _contextPool[index].FloaterInit);
519InitTableObjInfo(ptsHost, ref _contextPool[index].TableobjInit);
522if (_contextPool[index].IsOptimalParagraphEnabled)
528_contextPool[index].TextPenaltyModule = penaltyModule;
529_contextPool[index].ContextInfo.ptsPenaltyModule = ptsPenaltyModule;
530_contextPool[index].TextFormatter = TextFormatter.CreateFromContext(textFormatterContext, textFormattingMode);
536GC.SuppressFinalize(_contextPool[index].TextPenaltyModule);
540PTS.Validate(PTS.CreateDocContext(ref _contextPool[index].ContextInfo, out context));
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (27)
184RealizedColumnsBlock rcb = blockList[i];
196RealizedColumnsBlock nextRcb = blockList[i + 1];
202measureWidth += GetColumnEstimatedMeasureWidthSum(blockList[blockList.Count - 1].EndIndex + 1, parentDataGrid.Columns.Count - 1, averageColumnWidth);
484if (indexList[i] != indexList[i - 1] + 1)
488resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i - 1], 0));
492RealizedColumnsBlock lastRealizedColumnsBlock = resultList[resultList.Count - 1];
494resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i - 1], startIndexOffset));
497startIndex = indexList[i];
504resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i], 0));
508RealizedColumnsBlock lastRealizedColumnsBlock = resultList[resultList.Count - 1];
510resultList.Add(new RealizedColumnsBlock(startIndex, indexList[i], startIndexOffset));
772UIElement child = _realizedChildren[realizedChildIndex];
1012if (realizedColumnDisplayIndices[displayIndexListIterator] == displayIndex)
1016else if (realizedColumnDisplayIndices[displayIndexListIterator] > displayIndex)
1050RealizedColumnsBlock block = (blockCount > 0 ? blockList[blockIndex] : new RealizedColumnsBlock(-1, -1, -1));
1200realizedChild = _realizedChildren[realizedIndex];
1349RealizedColumnsBlock lastBlock = blockList[blockList.Count - 1];
1350RealizedColumnsBlock lastDisplayIndexBlock = displayIndexBlockList[displayIndexBlockList.Count - 1];
1410j < additionalChildrenCount && additionalChildIndices[j] <= childIndex; j++)
1438UIElement child = children[additionalChildIndices[i]] as UIElement;
1557RealizedColumnsBlock block = blockList[i];
1575RealizedColumnsBlock lastBlock = blockList[blockList.Count - 1];
1595RealizedColumnsBlock block = blockList[blockIndex++];
1622block = blockList[blockIndex++];
1660RealizedColumnsBlock block = blockList[j];
1669int childColumnIndex = (displayIndex < 0 ? -1 : displayIndexMap[displayIndex]);
src\Framework\System\Windows\StyleHelper.cs (9)
2238DependencyObject walk = templateChain[i];
2269DependencyObject walk = templateChain[i];
2533TriggerAction action = actionsList[i];
3538if (dictionaries[i].HasImplicitStyles)
4360InvokePropertyTriggerActions( triggerList[i], container, dp, changedArgs, sourceChildIndex,
4811InvokeActions(actionList[i].TriggerBase,
4812triggerContainer, actionList[i].TriggerActionCollection,
5291InvokeDataTriggerActions( triggerList[i], container, binding, e,
5451DependencyObject child = styledChildren[childIndex - 1];
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\ExtensibilityAccessor.cs (1)
682if (properties[i].IsReadOnly)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorEditor.cs (27)
74&& this.editedConnector.Points[this.editedConnector.Points.Count - 1] != this.EditPoints[this.EditPoints.Count - 1].Location);
186if (this.editPoints.Count < 2 || !this.editPoints[this.editPoints.Count - 1].Equals(editedConnector.Points[editedConnector.Points.Count - 1]))
204this.editPoints.Insert(this.editPoints.Count - 1, new EditPoint(EditPoint.EditPointTypes.MultiSegmentEditPoint, segments[i]));
243segments.Add(this.EditPoints[i].Location);
268this.editPoints[this.editPoints.Count - 1].Type != EditPoint.EditPointTypes.ConnectionEditPoint ||
278if (this.editPoints[i].Type != EditPoint.EditPointTypes.MultiSegmentEditPoint ||
279this.editPoints[i] == this.activeEditPoint)
281editPointsToRetain.Add(this.editPoints[i]);
294EditPoint current = this.editPoints[i];
295EditPoint next = this.editPoints[i + 1];
310EditPoint previous = this.editPoints[i - 1];
311EditPoint current = this.editPoints[i];
312EditPoint next = this.editPoints[i + 1];
344EditPoint current = this.EditPoints[i];
347EditPoint previous = this.EditPoints[i - 1];
348EditPoint next = this.EditPoints[i + 1];
367EditPoint editPoint = this.editPoints[i];
376EditPoint editPoint = editPointsToRemove[i];
389this.editPoints[this.editPoints.Count - 1].Type != EditPoint.EditPointTypes.ConnectionEditPoint)
398EditPoint previous = (activeEditPointIndex > 0) ? this.editPoints[activeEditPointIndex - 1] : null;
399EditPoint next = (activeEditPointIndex < this.editPoints.Count - 1) ? this.editPoints[activeEditPointIndex + 1] : null;
447Fx.Assert(this.editPoints[editPoints.Count - 1].Type == EditPoint.EditPointTypes.ConnectionEditPoint, "EditPoint type is wrong.");
454Point end = this.editPoints[this.editPoints.Count - 1].Location;
607drawingContext.DrawEllipse(renderBrush, renderPen, adornedEditor.EditPoints[i].Location, renderRadius, renderRadius);
610drawingContext.DrawLine(renderPen, adornedEditor.EditPoints[i].Location, adornedEditor.EditPoints[i + 1].Location);
613drawingContext.DrawEllipse(renderBrush, renderPen, adornedEditor.EditPoints[i].Location, renderRadius, renderRadius);
System\Data\Metadata\Edm\MetadataCollection.cs (9)
148return _collectionData.OrderedList[index];
348AddToDictionary(collectionData, collectionData.OrderedList[i].Identity, i, false);
403return ((string)orderedList[index].Identity == (string)identity);
522if (String.Equals(collectionData.OrderedList[i].Identity, identity, StringComparison.OrdinalIgnoreCase))
557if (index != -1 && _collectionData.OrderedList[index] == item)
624_collectionData.OrderedList[i].SetReadOnly();
655(ignoreCase && String.Equals(_collectionData.OrderedList[index].Identity, identity, StringComparison.OrdinalIgnoreCase)) ||
657return (0 <= index) ? _collectionData.OrderedList[index] : null;
719AddToDictionary(this, this.OrderedList[i].Identity, i, false);
System\Data\Query\PlanCompiler\JoinGraph.cs (27)
910if (AddJoinEdge(joinNode, joinNode.LeftVars[i], joinNode.RightVars[i]))
916AddJoinEdge(joinNode, joinNode.RightVars[i], joinNode.LeftVars[i]);
1100edgeVars.Add(new KeyValuePair<ColumnVar, ColumnVar>(keyVars[i], valueVars[i]));
1154newJoinEdge.AddCondition(augmentedJoinNode, joinEdge.RightVars[i], joinEdge.LeftVars[i]);
1307JoinEdge e1 = tableNode.JoinEdges[i];
1312JoinEdge e2 = rightTable.JoinEdges[j];
1509if (tableNode.Table.ReferencedColumns.IsSet(tableVars[i]))
1511m_varMap[tableVars[i]] = replacementVars[i];
1512AddReverseMapping(replacementVars[i], tableVars[i]);
1513replacementNode.Table.ReferencedColumns.Set(replacementVars[i]);
1692if (!edge2.LeftVars[j].Equals(edge1.LeftVars[j]) ||
1693!edge2.RightVars[j].ColumnMetadata.Name.Equals(edge1.RightVars[j].ColumnMetadata.Name))
1797if (!joinEdge.LeftVars[i].ColumnMetadata.Name.Equals(joinEdge.RightVars[i].ColumnMetadata.Name))
2421if (!m_varMap.TryGetValue(joinNode.LeftVars[i], out newLeftVar))
2423newLeftVar = joinNode.LeftVars[i];
2425if (!m_varMap.TryGetValue(joinNode.RightVars[i], out newRightVar))
2427newRightVar = joinNode.RightVars[i];
2814subree = root.Children[i];
System\Data\Query\PlanCompiler\NestPullup.cs (40)
513Node newNestChild = ApplyIsNotNullFilter(chi.Children[i], sentinelVar);
522newNestChildren.Add(chi.Children[i]);
924CollectionInfo ci = nestedNestOp.CollectionInfo[i - 1];
928newNestInputs.Add(nestedNestNode.Children[i]);
937CollectionInfo ci = nestOp.CollectionInfo[i - 1];
939newNestInputs.Add(nestNode.Children[i]);
1128newNestedNestNodeInputs.Add(projectNode.Child0.Children[j]);
1394newNestNodeChildren.Add(nestNode.Children[i]);
1406leftCorrelationVars.Or(nestNode.Children[i].GetExtendedNodeInfo(Command).ExternalReferences);
1469nestOpOutputs.Or(newNestNodeChildren[i].GetNodeInfo(Command).ExternalReferences);
2128Node chi = nestNode.Children[i];
2132CollectionInfo chiCi = nestOp.CollectionInfo[i - 1];
2146VarVec childKeys = Command.CreateVarVec(((SingleStreamNestOp)nestNode.Children[i].Op).Keys);
2264CollectionInfo ci = nestOp.CollectionInfo[i - 1];
2265List<InternalTrees.SortKey> postfixSortKeys = postfixSortKeyList[i];
2267RemapSortKeys(postfixSortKeys, varMapList[i]);
2270ColumnMap newColumnMap = ColumnMapTranslator.Translate(ci.ColumnMap, varMapList[i]);
2271VarList newFlattenedElementVars = RemapVarList(ci.FlattenedElementVars, varMapList[i]);
2272VarVec newCollectionKeys = RemapVarVec(ci.Keys, varMapList[i]);
2274RemapSortKeys(ci.SortKeys, varMapList[i]);
2366Node inputNode = nestNode.Children[i];
2405VarList flattenedElementVars = nestOp.CollectionInfo[i - 1].FlattenedElementVars;
2406foreach (InternalTrees.SortKey sortKey in sortKeys[i])
2503varRemapper.AddMapping(drivingNodeVars[j], newDrivingNodeVars[j]);
2506varRemapper.RemapSubtree(nestNode.Children[i]);
2509newFlattenedElementVars = varRemapper.RemapVarList(nestOp.CollectionInfo[i - 1].FlattenedElementVars);
2518newFlattenedElementVars = nestOp.CollectionInfo[i - 1].FlattenedElementVars;
2526Node applyNode = Command.CreateNode(op, newDrivingNode, nestNode.Children[i]);
2537projectOutputs.Add(discriminatorVarList[i]);
2545CollectionInfo otherCollectionInfo = nestOp.CollectionInfo[j - 1];
2586Var outputVar = Command.CreateSetOpVar(unionAllOutputs[idx].Type);
2587unionAllMap.Add(outputVar, unionAllOutputs[idx]);
2588projectMap.Add(outputVar, projectOutputs[idx]);
2614VarList varList = (i == 0) ? drivingNodeVars : nestOp.CollectionInfo[i - 1].FlattenedElementVars;
2713m_newCollectionVarDefinitions.Add(newOp.CollectionInfo[i].CollectionVar, result.Children[i + 1]);
2781Node originalChild = n.Children[i];
2782n.Children[i] = VisitNode(n.Children[i]);
2783if (!Object.ReferenceEquals(originalChild, n.Children[i]) || changedNodes.Contains(originalChild))
System\UriTemplate.cs (25)
546this.segments[i].Lookup(result.RelativePathSegments[i], result.BoundVariables);
589if (!this.segments[i].IsEquivalentTo(other.segments[i],
667this.segments[segmentIndex++].Bind(parameters, ref parameterIndex, pathString);
674while (this.segments[segmentIndex].Nature == UriTemplatePartType.Literal)
676this.segments[segmentIndex++].Bind(parameters, ref parameterIndex, pathString);
689this.segments[i].Bind(parameters, ref parameterIndex, pathString);
746switch (this.segments[i].Nature)
750UriTemplateVariablePathSegment vps = this.segments[i] as UriTemplateVariablePathSegment;
779if (!this.segments[relativeSegmentsIndex].IsMatch(lps, ignoreSlash))
849if (!this.segments[i].IsEquivalentTo(other.segments[i],
1210if (this.pathSegmentVariableNature[varIndex] != UriTemplatePartType.Variable)
1379string varName = this.pathSegmentVariableNames[i];
1399string varName = this.pathSegmentVariableNames[i];
1407varName, this.pathSegmentVariableNames[i + 1])));
1423this.owner.originalTemplate, this.pathSegmentVariableNames[this.firstNullablePathVariable])));
1428if (this.owner.segments[segmentIndex].Nature != UriTemplatePartType.Variable)
1432this.owner.originalTemplate, this.pathSegmentVariableNames[this.firstNullablePathVariable],
1433this.owner.segments[segmentIndex].OriginalSegment)));
1448UriTemplatePathSegment ps = this.owner.segments[firstOptionalSegment - 1];
1489this.defaultValues.TryGetValue(this.pathSegmentVariableNames[i], out normalizedParameters[i]);
1495(this.owner.segments[this.owner.segments.Count - 1].Nature != UriTemplatePartType.Literal))
1501if (this.defaultValues.TryGetValue(this.pathSegmentVariableNames[lastNonDefaultPathParameter],
1541SR.GetString(SR.BindUriTemplateToNullOrEmptyPathParam, this.pathSegmentVariableNames[i]));