Implemented interface members:
property
Count
System.Collections.Generic.ICollection<T>.Count
property
Count
System.Collections.Generic.IReadOnlyCollection<T>.Count
170 references to Count
mscorlib (2)
system\arraysegment.cs (2)
296Contract.Requires(arraySegment.Count >= 0); 297Contract.Requires(arraySegment.Offset + arraySegment.Count <= arraySegment.Array.Length);
System (47)
net\System\Net\Internal.cs (2)
938if (segment.Offset < 0 || segment.Count < 0 939|| segment.Count > (segment.Array.Length - segment.Offset)) {
net\System\Net\Sockets\_OverlappedAsyncResult.cs (1)
163m_WSABuffers[i].Length = buffersCopy[i].Count;
net\System\Net\Sockets\Socket.cs (4)
1338WSABuffers[i].Length = buffer.Count; 1874WSABuffers[i].Length = buffer.Count; 9584if (!allocateNewWSABuffers && tempList[i].Count != m_WSABufferArray[i].Length) { 9604m_WSABufferArray[i].Length = localCopy.Count;
net\System\Net\WebSockets\ClientWebSocket.cs (1)
530WebSocketBuffer.Validate(buffer.Count, receiveBufferSize, sendBufferSize, false);
net\System\Net\WebSockets\WebSocket.cs (2)
79WebSocketBuffer.Validate(internalBuffer.Count, receiveBufferSize, sendBufferSize, false); 104WebSocketBuffer.Validate(internalBuffer.Count, receiveBufferSize, WebSocketBuffer.MinSendBufferSize, true);
net\System\Net\WebSockets\WebSocketBase.cs (13)
362if (s_LoggingEnabled && buffer.Count > 0) 369buffer.Count); 420buffer.Count, 1753payload.Count, 1805sendBufferSize += framingBuffer.Count; 1828sendBufferSize += payload.Count; 2030if (payload.Count > buffer.Value.Count) 2032m_WebSocket.m_InternalBuffer.BufferPayload(payload, buffer.Value.Count, messageType, endOfMessage); 2037bytesTransferred = Math.Min(payload.Count, (int)buffer.Value.Count); 2093payloadBuffer.Data.BufferLength = (uint)buffer.Value.Count; 2175payloadBuffer.CloseStatus.ReasonLength = (uint)closeBuffer.Count;
net\System\Net\WebSockets\WebSocketBuffer.cs (15)
80m_NativeBuffer.Offset + m_NativeBuffer.Count, 83m_PayloadBuffer.Offset + m_PayloadBuffer.Count, 105Contract.Assert(internalBuffer.Count >= GetInternalBufferSize(receiveBufferSize, sendBufferSize, false), 114Contract.Assert(internalBuffer.Count >= GetInternalBufferSize(receiveBufferSize, sendBufferSize, true), 176PropertySize = (uint)m_NativeBuffer.Count, 198WebSocketHelpers.ValidateBuffer(payload.Array, payload.Offset, payload.Count); 213m_PinnedSendBufferEndAddress = m_PinnedSendBufferStartAddress + m_PinnedSendBuffer.Count; 219return ConvertPinnedSendPayloadToNative(payload.Array, payload.Offset, payload.Count); 274offset + count <= m_PinnedSendBuffer.Offset + m_PinnedSendBuffer.Count; 324int bytesBuffered = payload.Count - unconsumedDataOffset; 348int bytesTransferred = Math.Min(buffer.Count, m_BufferedPayloadReceiveResult.Count); 438reason = Encoding.UTF8.GetString(reasonBlob.Array, reasonBlob.Offset, reasonBlob.Count); 580Contract.Assert(m_PayloadOffset <= m_PayloadBuffer.Count, 582Contract.Assert(m_PayloadOffset + m_BufferedPayloadReceiveResult.Count <= m_PayloadBuffer.Count, 613offset + count <= m_NativeBuffer.Offset + m_NativeBuffer.Count;
net\System\Net\WebSockets\WebSocketConnectionStream.cs (2)
337Logging.Dump(Logging.WebSockets, this, Methods.MultipleWriteAsync, buffer.Array, buffer.Offset, buffer.Count); 609buffers[index] = new BufferOffsetSize(sendBuffer.Array, sendBuffer.Offset, sendBuffer.Count, false);
net\System\Net\WebSockets\WebSocketHelpers.cs (3)
62WebSocketBuffer.Validate(internalBuffer.Count, receiveBufferSize, WebSocketBuffer.MinSendBufferSize, true); 553if (arraySegment.Count < 0 || arraySegment.Count > (arraySegment.Array.Length - arraySegment.Offset))
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (4)
353return WriteAsync(buffer.Array, buffer.Offset, buffer.Count, cancellationToken); 1143UpdateDataChunk(0, m_BufferList[0].Array, m_BufferList[0].Offset, m_BufferList[0].Count); 1144UpdateDataChunk(1, m_BufferList[1].Array, m_BufferList[1].Offset, m_BufferList[1].Count); 1242Logging.Dump(Logging.WebSockets, this, Methods.WriteAsyncFast, buffer.Array, buffer.Offset, buffer.Count);
System.Activities.DurableInstancing (12)
System\Activities\DurableInstancing\CorrelationKey.cs (1)
56xmlWriter.WriteAttributeString("BinaryLength", this.BinaryData.Count.ToString(CultureInfo.InvariantCulture));
System\Activities\DurableInstancing\CreateWorkflowOwnerAsyncResult.cs (4)
93parameters.Add(new SqlParameter { ParameterName = "@primitiveLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[0].Count, Value = (object)(properties[0].Array) ?? DBNull.Value }); 94parameters.Add(new SqlParameter { ParameterName = "@complexLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[1].Count, Value = (object)(properties[1].Array) ?? DBNull.Value }); 95parameters.Add(new SqlParameter { ParameterName = "@writeOnlyPrimitiveLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[2].Count, Value = (object)(properties[2].Array) ?? DBNull.Value }); 96parameters.Add(new SqlParameter { ParameterName = "@writeOnlyComplexLockOwnerData", SqlDbType = SqlDbType.VarBinary, Size = properties[3].Count, Value = (object)(properties[3].Array) ?? DBNull.Value });
System\Activities\DurableInstancing\SaveWorkflowAsyncResult.cs (4)
192int parameterSize = source.Count > 8000 ? source.Count : -1; 201byte[] destination = new byte[source.Count]; 202Buffer.BlockCopy(source.Array, 0, destination, 0, source.Count);
System\Activities\DurableInstancing\SerializationUtilities.cs (3)
26long memoryRequired = correlationKeys.Sum(i => i.BinaryData.Count); 36Buffer.BlockCopy(correlationKey.BinaryData.Array, 0, concatenatedBlob, Convert.ToInt32(insertLocation), Convert.ToInt32(correlationKey.BinaryData.Count)); 38insertLocation += correlationKey.BinaryData.Count;
System.IO.Log (7)
System\IO\Log\AppendHelper.cs (1)
44blobs[i + 1].cbSize = (uint)data[i].Count;
System\IO\Log\FileRecordSequence.cs (2)
209size += data[i].Count; 728size = checked(size + data[i].Count);
System\IO\Log\LogRecordSequence.cs (1)
1008dataLength = checked(dataLength + segment.Count);
System\IO\Log\LogReserveAndAppendState.cs (1)
492this.writeEntries[entryIndex].ByteLength = segment.Count;
System\IO\Log\LogWriteRestartAreaState.cs (2)
386segment.Count); 387restartAreaSize += segment.Count;
System.Runtime.Serialization (2)
System\Runtime\Serialization\Json\XmlJsonReader.cs (1)
845BufferReader.SetBuffer(seg.Array, seg.Offset, seg.Count, null, null);
System\Xml\XmlUTF8TextReader.cs (1)
317BufferReader.SetBuffer(seg.Array, seg.Offset, seg.Count, null, null);
System.ServiceModel (77)
System\ServiceModel\Channels\BinaryMessageEncoder.cs (15)
323((IXmlBinaryReaderInitializer)xmlReader).SetInput(buffer.Array, buffer.Offset, buffer.Count, 331xmlReader = XmlDictionaryReader.CreateBinaryReader(buffer.Array, buffer.Offset, buffer.Count, 491int messageSize = messageData.Offset + messageData.Count; 503int requiredBufferSize = messageData.Offset + messageData.Count + dictionarySize; 507Buffer.BlockCopy(buffer, messageData.Offset, newBuffer, messageData.Offset, messageData.Count); 512Buffer.BlockCopy(buffer, messageData.Offset, buffer, messageData.Offset + dictionarySize, messageData.Count); 528int newSize = headerSize + messageData.Count + dictionarySize; 549headerSize = decoder.Decode(buffer, messageData.Offset, messageData.Count); 551if (dictionarySize > messageData.Count) 556newSize = messageData.Count - headerSize - dictionarySize; 652message = messagePatterns.TryCreateMessage(buffer.Array, buffer.Offset, buffer.Count, bufferManager, messageData); 674buffer.Count, 805XmlDictionaryReader xmlDictionaryReader = XmlDictionaryReader.CreateBinaryReader(messageData.Array, messageData.Offset, messageData.Count, XD.Dictionary, XmlDictionaryReaderQuotas.Max, this.readerSessionForLogging, null); 825messageData.Count, 1882return messageDataAtBody.Buffer.Count;
System\ServiceModel\Channels\Connection.cs (1)
933ValidateBufferBounds(buffer.Array, buffer.Offset, buffer.Count);
System\ServiceModel\Channels\FramingChannels.cs (4)
90this.Connection.Write(messageData.Array, messageData.Offset, messageData.Count, !allowOutputBatching, 107return this.Connection.BeginWrite(messageData.Array, messageData.Offset, messageData.Count, 259connection.Write(preamble.Array, preamble.Offset, preamble.Count, true, timeoutHelper.RemainingTime()); 458preamble.Array, preamble.Offset, preamble.Count,
System\ServiceModel\Channels\FramingEncoders.cs (6)
219int spaceNeeded = 1 + IntEncoder.GetEncodedSize(messageFrame.Count); 229IntEncoder.Encode(messageFrame.Count, buffer, offset); 230return new ArraySegment<byte>(buffer, messageFrame.Offset - spaceNeeded, messageFrame.Count + spaceNeeded); 304int spaceNeeded = IntEncoder.GetEncodedSize(messageFrame.Count); 313IntEncoder.Encode(messageFrame.Count, buffer, offset); 314return new ArraySegment<byte>(buffer, offset, messageFrame.Count + spaceNeeded);
System\ServiceModel\Channels\HttpChannelHelpers.cs (18)
157if (ContentLength == -1 && buffer.Count == settings.MaxReceivedMessageSize) 188int count = messageBuffer.Count; 710this.count = this.buffer.Count; 1358httpResponseMessage.Content = new HttpOutputByteArrayContent(messageBytes.Array, messageBytes.Offset, messageBytes.Count, this.bufferManager); 1911Fx.Assert(buffer.Count != 0, "We should always have an entity body in this case..."); 1912outputStream.Write(buffer.Array, buffer.Offset, buffer.Count); 1917SetContentLength(buffer.Count); 1920if (!isRequest || buffer.Count > 0) 1923outputStream.Write(buffer.Array, buffer.Offset, buffer.Count); 1983Fx.Assert(buffer.Count != 0, "We should always have an entity body in this case..."); 1984outputStream.Write(buffer.Array, buffer.Offset, buffer.Count); 1989SetContentLength(buffer.Count); 1992if (!isRequest || buffer.Count > 0) 1995outputStream.Write(buffer.Array, buffer.Offset, buffer.Count); 2077httpOutput.SetContentLength(buffer.Count); 2141httpOutput.SetContentLength(buffer.Count); 2181httpOutput.outputStream.BeginWrite(buffer.Array, buffer.Offset, buffer.Count, onWriteBody, this); 2283thisPtr.httpOutput.SetContentLength(thisPtr.buffer.Count);
System\ServiceModel\Channels\MessageBuffer.cs (2)
202return messageData.Buffer.Count; 216stream.Write(buffer.Array, buffer.Offset, buffer.Count);
System\ServiceModel\Channels\MessageEncoderCompressionHandler.cs (2)
18MemoryStream memoryStream = new MemoryStream(buffer.Array, buffer.Offset, buffer.Count); 68ds.Write(buffer.Array, buffer.Offset, buffer.Count);
System\ServiceModel\Channels\MsmqOutputChannel.cs (1)
149int size = messageData.Count + preamble.Length;
System\ServiceModel\Channels\MsmqOutputSessionChannel.cs (3)
44sessionGramSize += buffer.Count; 60Buffer.BlockCopy(buffer.Array, buffer.Offset, sessionGramBuffer, sessionGramOffset, buffer.Count); 61sessionGramOffset += buffer.Count;
System\ServiceModel\Channels\MtomMessageEncoder.cs (7)
251buffer.Count, 346messageData.Count, 356XmlDictionaryReader xmlDictionaryReader = XmlDictionaryReader.CreateMtomReader(messageData.Array, messageData.Offset, messageData.Count, MtomMessageEncoderFactory.GetSupportedEncodings(), contentType, XmlDictionaryReaderQuotas.Max, int.MaxValue, null); 648((IXmlMtomReaderInitializer)xmlReader).SetInput(buffer.Array, buffer.Offset, buffer.Count, MtomMessageEncoderFactory.GetSupportedEncodings(), ContentType, this.Quotas, this.messageEncoder.MaxBufferSize, onClose); 652xmlReader = XmlDictionaryReader.CreateMtomReader(buffer.Array, buffer.Offset, buffer.Count, MtomMessageEncoderFactory.GetSupportedEncodings(), ContentType, this.Quotas, this.messageEncoder.MaxBufferSize, onClose); 663((IXmlTextReaderInitializer)xmlReader).SetInput(buffer.Array, buffer.Offset, buffer.Count, TextMessageEncoderFactory.GetEncodingFromContentType(ContentType, this.messageEncoder.contentEncodingMap), this.Quotas, onClose); 667xmlReader = XmlDictionaryReader.CreateTextReader(buffer.Array, buffer.Offset, buffer.Count, TextMessageEncoderFactory.GetEncodingFromContentType(ContentType, this.messageEncoder.contentEncodingMap), this.Quotas, onClose);
System\ServiceModel\Channels\PeerNodeImplementation.cs (2)
406messageSize = (int)buffer.Count; 1447messageSize = (int)buffer.Count;
System\ServiceModel\Channels\SingletonConnectionReader.cs (2)
1646messageData.Count + envelopeStartBytes.Length, true, timeoutHelper.RemainingTime(), settings.BufferManager); 1800messageData.Count + envelopeStartBytes.Length, true, timeoutHelper.RemainingTime(),
System\ServiceModel\Channels\TextMessageEncoder.cs (5)
432buffer.Count, 497messageData.Count, 503XmlDictionaryReader xmlDictionaryReader = XmlDictionaryReader.CreateTextReader(messageData.Array, messageData.Offset, messageData.Count, null, XmlDictionaryReaderQuotas.Max, null); 842xmlReader = XmlDictionaryReader.CreateTextReader(buffer.Array, buffer.Offset, buffer.Count, this.encoding, this.Quotas, onClose); 850((IXmlTextReaderInitializer)xmlReader).SetInput(buffer.Array, buffer.Offset, buffer.Count, this.encoding, this.Quotas, onClose);
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (7)
216messageData.Count, 338messageData.Count, 1173if (this.initialReadBuffer.Count != 0) 1244if (this.initialReadBuffer.Count != 0) 1447int bytesToCopy = this.initialReadBuffer.Count > count ? count : this.initialReadBuffer.Count; 1449this.initialReadBuffer = new ArraySegment<byte>(this.initialReadBuffer.Array, this.initialReadBuffer.Offset + bytesToCopy, this.initialReadBuffer.Count - bytesToCopy);
System\ServiceModel\Diagnostics\MessageLogTraceRecord.cs (1)
56this.messageString = System.Text.Encoding.UTF8.GetString(buffer.Array, buffer.Offset, buffer.Count);
System\ServiceModel\Security\CryptoHelper.cs (1)
249cipherText = encrTransform.TransformFinalBlock(plainText.Array, plainText.Offset, plainText.Count);
System.ServiceModel.Channels (15)
System\ServiceModel\Channels\ByteStreamBufferedMessageData.cs (1)
92: base(byteStreamBufferedMessageData.Buffer.Array, byteStreamBufferedMessageData.Buffer.Offset, byteStreamBufferedMessageData.Buffer.Count, false)
System\ServiceModel\Channels\ByteStreamMessage.cs (2)
449writer.WriteBase64(this.bufferedMessageData.Buffer.Array, this.bufferedMessageData.Buffer.Offset, this.bufferedMessageData.Buffer.Count); 684get { return this.messageData.Buffer.Count; }
System\ServiceModel\Channels\ByteStreamMessageEncoder.cs (2)
120buffer.Count, 246messageBuffer.Count,
System\ServiceModel\Channels\DuplicateMessageDetector.cs (2)
35Fx.Assert(msgBytes.Count > 0, "messageBytes.Count must be > 0"); 47hash = this.hashAlgorithm.ComputeHash(msgBytes.Array, msgBytes.Offset, msgBytes.Count);
System\ServiceModel\Channels\UdpOutputChannel.cs (3)
143using (XmlDictionaryReader xmlDictionaryReader = XmlDictionaryReader.CreateTextReader(messageData.Array, messageData.Offset, messageData.Count, null, XmlDictionaryReaderQuotas.Max, null)) 428sockets[i].SendTo(messageBytes.Array, messageBytes.Offset, messageBytes.Count, remoteEndpoint); 795this.messageData.Count,
System\ServiceModel\Channels\UdpSocket.cs (1)
376this.Buffer.Count,
System\ServiceModel\Channels\UdpSocketReceiveManager.cs (1)
288int dataLength = receiveBuffer.Count;
System\ServiceModel\Channels\XmlBufferedByteStreamReader.cs (3)
47int bytesToCopy = Math.Min(bufferedMessageData.Buffer.Count - this.offset, count); 63int bytesToCopy = bufferedMessageData.Buffer.Count; 80length = bufferedMessageData.Buffer.Count;
System.ServiceModel.Web (6)
System\ServiceModel\Channels\JsonMessageEncoderFactory.cs (5)
192buffer.Count, 285messageData.Count, 292messageData.Array, messageData.Offset, messageData.Count, null, XmlDictionaryReaderQuotas.Max, null); 533xmlReader = JsonReaderWriterFactory.CreateJsonReader(buffer.Array, buffer.Offset, buffer.Count, this.encoding, this.Quotas, onClose); 537((IXmlJsonReaderInitializer)xmlReader).SetInput(buffer.Array, buffer.Offset, buffer.Count, this.encoding, this.Quotas, onClose);
System\ServiceModel\Channels\WebScriptMetadataMessageEncoderFactory.cs (1)
111System.ServiceModel.Diagnostics.Application.TD.MessageWrittenByEncoder(EventTraceActivityHelper.TryExtractActivity(message), messageData.Count, this);
System.Web (2)
Util\PinnedArraySegment.cs (2)
32segment = new ArraySegment<T>(segment.Array, segment.Offset, segment.Count); 36_count = segment.Count;