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