parent\parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (13)
175PinnableBufferCacheEventSource.Log.FreeBufferStillTooYoung(m_CacheName, m_NotGen2.Count);
209PinnableBufferCacheEventSource.Log.AllocateBufferFreeListEmpty(m_CacheName, m_NotGen2.Count);
212if (m_NotGen2.Count == 0)
217int idx = m_NotGen2.Count - 1;
226PinnableBufferCacheEventSource.Log.AllocateBufferFromNotGen2(m_CacheName, m_NotGen2.Count);
234if (m_NotGen2.Count == m_restockSize / 2)
255PinnableBufferCacheEventSource.Log.AllocateBufferAged(m_CacheName, m_NotGen2.Count);
256for (int i = 0; i < m_NotGen2.Count; i++)
270PinnableBufferCacheEventSource.Log.AgePendingBuffersResults(m_CacheName, promotedCount, notInGen2.Count);
372if (m_NotGen2.Count > 0)
379PinnableBufferCacheEventSource.Log.TrimFlush(m_CacheName, m_buffersUnderManagement, freeCount, m_NotGen2.Count);
385PinnableBufferCacheEventSource.Log.TrimFree(m_CacheName, m_buffersUnderManagement, freeCount, m_NotGen2.Count);
386m_buffersUnderManagement -= m_NotGen2.Count;
system\attribute.cs (4)
58Array array = CreateAttributeArrayHelper(type, attributeList.Count);
59Array.Copy(attributeList.ToArray(), 0, array, 0, attributeList.Count);
159Array array = CreateAttributeArrayHelper(type, attributeList.Count);
160Array.Copy(attributeList.ToArray(), 0, array, 0, attributeList.Count);
system\collections\generic\list.cs (26)
237return Count - 1;
246Contract.Ensures(Count >= Contract.OldValue(Count));
291Contract.Ensures(Contract.Result<int>() <= Count);
292return BinarySearch(0, Count, item, null);
297Contract.Ensures(Contract.Result<int>() <= Count);
298return BinarySearch(0, Count, item, comparer);
451Contract.Ensures(Contract.Result<int>() < Count);
457Contract.Ensures(Contract.Result<int>() < startIndex + Count);
500Contract.Ensures(Contract.Result<int>() < Count);
614Contract.Ensures(Contract.Result<int>() < Count);
639Contract.Ensures(Contract.Result<int>() < Count);
659Contract.Ensures(Contract.Result<int>() < Count);
756Contract.Ensures(Contract.Result<int>() < Count);
779Contract.Ensures(((Count == 0) && (Contract.Result<int>() == -1)) || ((Count > 0) && (Contract.Result<int>() <= index)));
794if ((Count != 0) && (index < 0)) {
798if ((Count !=0) && (count < 0)) {
802Contract.Ensures(((Count == 0) && (Contract.Result<int>() == -1)) || ((Count > 0) && (Contract.Result<int>() <= index)));
847Contract.Ensures(Contract.Result<int>() <= Contract.OldValue(Count));
918Reverse(0, Count);
949Sort(0, Count, null);
956Sort(0, Count, comparer);
1000Contract.Ensures(Contract.Result<T[]>().Length == Count);
1054return _list.Count;
system\reflection\customattribute.cs (8)
1371object[] typedResult = CreateAttributeArrayHelper(arrayType, result.Count);
1372Array.Copy(result.ToArray(), 0, typedResult, 0, result.Count);
1472object[] typedResult = CreateAttributeArrayHelper(arrayType, result.Count);
1473Array.Copy(result.ToArray(), 0, typedResult, 0, result.Count);
2222count = pcas.Count;
2288count = pcas.Count;
2414count = pcas.Count;
2516count = pcas.Count;
src\Framework\MS\Internal\Documents\TextBoxView.cs (51)
444if (_lineMetrics.Count == 0 || constraintschanged)
459_lineMetrics.Count == 1 && _lineMetrics[0].EndOffset == 0)
485Invariant.Assert(_lineMetrics.Count >= 1);
516if (_lineMetrics == null || _lineMetrics.Count == 0)
587return (_visualChildren == null) ? 0 : _visualChildren.Count;
701int startOffset = Math.Min(_lineMetrics[_lineMetrics.Count-1].EndOffset, startPosition.Offset);
702int endOffset = Math.Min(_lineMetrics[_lineMetrics.Count - 1].EndOffset, endPosition.Offset);
779int nextLineIndex = Math.Max(0, Math.Min(_lineMetrics.Count - 1, lineIndex + count));
898if (lineIndex == _lineMetrics.Count - 1)
1111int lastValidOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
1123int newLastValidOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
1184int max = _lineMetrics.Count;
1186Invariant.Assert(_lineMetrics.Count >= 1);
1205if (offset == record.EndOffset && index < _lineMetrics.Count - 1)
1310ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[_lineMetrics.Count-1].EndOffset, LogicalDirection.Forward);
1537if(_lineMetrics.Count == 0)
1646Invariant.Assert(_lineMetrics.Count >= 1);
1654if (point.Y >= _lineHeight * _lineMetrics.Count)
1656return snapToText ? _lineMetrics.Count-1 : -1;
1663int max = _lineMetrics.Count;
1956int j = _visualChildren.Count - 1; // last non-discarded element index
1958for (int i = _visualChildren.Count - 1; i >= 0; i--)
1973if (j < _visualChildren.Count - 1)
1975_visualChildren.RemoveRange(j + 1, _visualChildren.Count - j - 1);
1988lineVisual._parentIndex = _visualChildren.Count;
1996for (int i = 0; i < _visualChildren.Count; i++)
2204firstLineIndex = Math.Max(0, Math.Min(firstLineIndex, _lineMetrics.Count - 1));
2205lastLineIndex = Math.Max(0, Math.Min(lastLineIndex, _lineMetrics.Count - 1));
2211lastLineIndex = _lineMetrics.Count - 1;
2231if (_lineMetrics.Count == 0)
2239lineOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
2329if (range.StartIndex > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2349if (range.StartIndex > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2388for (int i = lineIndex + 1; i < _lineMetrics.Count; i++)
2447if (endOffset > _lineMetrics[_lineMetrics.Count - 1].EndOffset)
2450endOffset = _lineMetrics[_lineMetrics.Count - 1].EndOffset;
2462for (int i = lastLineIndex + 1; i < _lineMetrics.Count; i++)
2555(lineIndex == _lineMetrics.Count ||
2559if (lineIndex < _lineMetrics.Count &&
2578if (lineIndex == _lineMetrics.Count ||
2631if (endOfParagraph && lineIndex < _lineMetrics.Count)
2633int count = _lineMetrics.Count - lineIndex;
2645for (int i = 0; i < _lineMetrics.Count; i++)
2649desiredSize.Height = _lineMetrics.Count * _lineHeight;
2705int oldLastLineIndex = oldLineVisualsIndex + oldLineVisuals.Count - 1;
2728for (int i = lineIndex - oldLineVisualsIndex + lineCount; i < oldLineVisuals.Count; i++)
2772lineIndex < _viewportLineVisualsIndex + _viewportLineVisuals.Count)
2786lineIndex < _viewportLineVisualsIndex + _viewportLineVisuals.Count &&
2808if (lineIndex < _viewportLineVisualsIndex + _viewportLineVisuals.Count)
2811count = Math.Min(count, _viewportLineVisuals.Count - start);
2904_lineMetrics[_lineMetrics.Count - 1].EndOffset >= position.Offset;
src\Framework\MS\Internal\PtsHost\BreakRecordTable.cs (25)
65Invariant.Assert(pageNumber >= 0 && pageNumber <= _breakRecords.Count, "Invalid PageNumber.");
91if (pageNumber < _breakRecords.Count)
125Invariant.Assert(pageNumber >= 0 && pageNumber <= _breakRecords.Count, "Invalid PageNumber.");
131while (pageNumber < _breakRecords.Count)
158if (_breakRecords.Count > 0)
161InvalidateBreakRecords(0, _breakRecords.Count);
182if (_breakRecords.Count > 0)
190pageCount = _breakRecords.Count - pageStart;
212if (_breakRecords.Count > 0)
215DisposePages(0, _breakRecords.Count);
219_owner.OnPagesChanged(0, _breakRecords.Count);
232if (_breakRecords.Count > 0)
260Invariant.Assert(pageNumber >= 0 && pageNumber <= _breakRecords.Count, "The previous BreakRecord does not exist.");
277if (pageNumber == _breakRecords.Count)
324if (pageNumber > _breakRecords.Count)
345get { return _breakRecords.Count; }
355if (_breakRecords.Count == 0)
357Invariant.Assert(_breakRecords[_breakRecords.Count - 1] != null, "Invalid BreakRecordTable entry.");
358return (_breakRecords[_breakRecords.Count - 1].BreakRecord == null);
382Invariant.Assert(start >= 0 && start < _breakRecords.Count, "Invalid starting index for BreakRecordTable invalidation.");
383Invariant.Assert(start + count <= _breakRecords.Count, "Partial invalidation of BreakRecordTable is not allowed.");
408Invariant.Assert(start >= 0 && start < _breakRecords.Count, "Invalid starting index for BreakRecordTable invalidation.");
409Invariant.Assert(start + count == _breakRecords.Count, "Partial invalidation of BreakRecordTable is not allowed.");
445while (pageStart < _breakRecords.Count)
483pageCount = _breakRecords.Count - pageStart;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\ActivityDesigner.cs (1)
100if (list.Count > 0)
System\Data\Query\PlanCompiler\JoinGraph.cs (42)
371PlanCompiler.Assert(m_leftVars.Count == m_rightVars.Count, "Count mismatch: " + m_leftVars.Count + "," + m_rightVars.Count);
692augmentedNode = new AugmentedTableNode(m_vertexes.Count, node);
707augmentedNode = new AugmentedJoinNode(m_vertexes.Count, node, left, right, leftVars, rightVars, otherPredicate);
717augmentedNode = new AugmentedJoinNode(m_vertexes.Count, node, children);
722augmentedNode = new AugmentedNode(m_vertexes.Count, node);
891joinNode.LeftVars.Count == 0)
907for (int i = 0; i < joinNode.LeftVars.Count; i++)
1017if (edge1.JoinKind == JoinKind.LeftOuter && edge1.RightVars.Count != edge2.LeftVars.Count)
1097List<KeyValuePair<ColumnVar, ColumnVar>> edgeVars = new List<KeyValuePair<ColumnVar, ColumnVar>>(keyVars.Count);
1098for (int i = 0; i < keyVars.Count; i++)
1133foreach (AugmentedJoinNode augmentedJoinNode in m_vertexes.OfType<AugmentedJoinNode>().Where(j => j.Node.Op.OpType == OpType.LeftOuterJoin && j.JoinEdges.Count > 0))
1142List<JoinEdge> newJoinEdges = new List<JoinEdge>(augmentedJoinNode.JoinEdges.Count);
1152for (int i = 1; i < joinEdge.LeftVars.Count; i++)
1269PlanCompiler.Assert(fkConstraints != null && fkConstraints.Count > 0, "invalid fk constraints?");
1275if (fkConstraint.ParentKeys.Count == joinEdge.RightVars.Count &&
1305while (i < tableNode.JoinEdges.Count)
1310while (j < rightTable.JoinEdges.Count)
1486PlanCompiler.Assert(tableVars.Count == replacementVars.Count, "var count mismatch");
1487PlanCompiler.Assert(tableVars.Count > 0, "no vars in the table ?");
1503for (int i = 0; i < tableVars.Count; i++)
1642foreach (List<JoinEdge> joinList in compatibleGroups.Where(l => l.Count > 1))
1681if (edge2.LeftVars.Count != edge1.LeftVars.Count ||
1688for (int j = 0; j < edge2.LeftVars.Count; j++)
1766if (kv.Value.Count <= 1)
1795for (int i = 0; i < joinEdge.LeftVars.Count; i++)
2041return TryEliminateRightTable(joinEdge, fkConstraint.ChildKeys.Count, fkConstraint.ChildMultiplicity == md.RelationshipMultiplicity.One);
2057childForeignKeyVars = new List<ColumnVar>(fkConstraint.ChildKeys.Count);
2154return TryEliminateRightTable(joinEdge, fkConstraint.ParentKeys.Count, true);
2178if ((!allowRefsForJoinedOnFkOnly || joinEdge.RightVars.Count != fkConstraintKeyCount) && RightTableHasKeyReferences(joinEdge))
2206PlanCompiler.Assert(fkConstraints != null && fkConstraints.Count > 0, "invalid fk constraints?");
2226PlanCompiler.Assert(fkConstraints != null && fkConstraints.Count > 0, "invalid fk constraints?");
2417for (int i = 0; i < joinNode.LeftVars.Count; i++)
2474if (newChildren.Count == 0)
2478else if (newChildren.Count == 1)
2812while ((subree.Id < nodeId) && (i < root.Children.Count))
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (33)
974PlanCompiler.Assert(typeInfo.RootType.FlattenedType.Properties.Count == varInfo.NewVars.Count,
975"Var count mismatch; Expected " + typeInfo.RootType.FlattenedType.Properties.Count + "; got " + varInfo.NewVars.Count + " instead.");
1210return (tableOp.Table.Columns.Count == 1) ? tableOp.Table.Columns[0] : null;
1230return unnestOp.Table.Columns.Count == 1 ? unnestOp.Table.Columns[0] : null;
1261PlanCompiler.Assert(op.Table.Columns.Count == 1, "table for scanViewOp has more than on column?");
1348PlanCompiler.Assert(newChildren.Count == 1, "Flattening unnest var produced more than one Var.");
1746int outputPropertyCount = newOp.Properties.Count;
1750int inputPropertyCount = n.Child0.Children.Count;
1875PlanCompiler.Assert(n.Children.Count == 0, "Constant operations don't have children.");
2066for (int i = 0; i < n.Children.Count - 1; )
2076Node elseNode = BuildAccessorWithNulls(n.Children[n.Children.Count - 1], property);
2150PlanCompiler.Assert((properties1.Count == properties2.Count) && (values1.Count == values2.Count), "different shaped structured types?");
2154for (int i = 0; i < values1.Count; i++)
2216PlanCompiler.Assert(properties.Count == values.Count && properties.Count > 0, "No properties returned from GetPropertyValues(IsNull)?");
2316PlanCompiler.Assert(inputFieldValues.Count == outputFieldTypes.Count, "fieldTypes.Count mismatch?");
2456PlanCompiler.Assert(outputFields.Count == inputFields.Count, "Mismatched field count: Expected " + inputFields.Count + "; Got " + outputFields.Count);
2461PlanCompiler.Assert(outputFields.Count == inputFields.Count + 1, "Mismatched field count: Expected " + (inputFields.Count + 1) + "; Got " + outputFields.Count);
2475PlanCompiler.Assert(outputFields.Count == inputFields.Count, "Mismatched field count: Expected " + inputFields.Count + "; Got " + outputFields.Count);
System\UriTemplate.cs (42)
258this.firstOptionalSegment = this.segments.Count;
553else if (numMatchedSegments < this.segments.Count)
584Fx.Assert(segmentsCount <= this.segments.Count, "How can that be? The Trie is constructed that way!");
586Fx.Assert(segmentsCount <= other.segments.Count, "How can that be? The Trie is constructed that way!");
665Fx.Assert(segmentIndex < this.segments.Count,
672Fx.Assert(segmentIndex < this.segments.Count,
679Fx.Assert(segmentIndex < this.segments.Count,
685else if (this.segments.Count > 0 || this.wildcard != null)
687for (int i = 0; i < this.segments.Count; i++)
741Fx.Assert(numMatchedSegments < this.segments.Count, "Otherwise - no defaults to bind");
744for (int i = numMatchedSegments; i < this.segments.Count; i++)
775if (relativeSegmentsIndex < this.segments.Count)
843if (this.segments.Count != other.segments.Count)
847for (int i = 0; i < this.segments.Count; ++i)
850(i == this.segments.Count - 1) && !this.HasWildcard && (this.ignoreTrailingSlash || other.ignoreTrailingSlash)))
1204(varIndex == this.pathSegmentVariableNames.Count - 1))
1342if ((parameters.Length < this.pathSegmentVariableNames.Count) ||
1343(parameters.Length > this.pathSegmentVariableNames.Count + this.queryValueVariableNames.Count))
1347this.pathSegmentVariableNames.Count, this.queryValueVariableNames.Count,
1352if (parameters.Length == this.pathSegmentVariableNames.Count + this.queryValueVariableNames.Count)
1358normalizedParameters = new string[this.pathSegmentVariableNames.Count + this.queryValueVariableNames.Count];
1375Fx.Assert(this.pathSegmentVariableNames.Count > 0, "Otherwise, how can we have default values");
1377for (int i = this.pathSegmentVariableNames.Count - 1; (i >= 0) && (this.firstNullablePathVariable == -1); i--)
1417if (this.firstNullablePathVariable < this.pathSegmentVariableNames.Count)
1425for (int i = this.pathSegmentVariableNames.Count - 1; i >= this.firstNullablePathVariable; i--)
1427int segmentIndex = this.owner.segments.Count - (this.pathSegmentVariableNames.Count - i);
1442int numNullablePathVariables = (this.pathSegmentVariableNames.Count - this.firstNullablePathVariable);
1443firstOptionalSegment = this.owner.segments.Count - numNullablePathVariables;
1485for (int i = 0; i < this.pathSegmentVariableNames.Count; i++)
1493lastNonDefaultPathParameter = this.pathSegmentVariableNames.Count - 1;
1495(this.owner.segments[this.owner.segments.Count - 1].Nature != UriTemplatePartType.Literal))
1533(i == this.pathSegmentVariableNames.Count - 1))
1577string[] normalizedParameters = new string[this.pathSegmentVariableNames.Count + this.queryValueVariableNames.Count];
1603normalizedParameters[this.pathSegmentVariableNames.Count + queryVarIndex] = (string.IsNullOrEmpty(value) ? string.Empty : value);
1712Fx.Assert(numMatchedSegments == this.owner.segments.Count, "We should have matched the other segments");