Base:
property
Length
System.IO.Stream.Length
1 override of Length
mscorlib (1)
system\io\unmanagedmemorystreamwrapper.cs (1)
84
public override long
Length
{
129 references to Length
mscorlib (15)
system\io\isolatedstorage\isolatedstoragefile.cs (1)
2389
fs.Write(b, 0, (int)s.
Length
);
system\io\memorystream.cs (1)
291
if (value <
Length
) throw new ArgumentOutOfRangeException("value", Environment.GetResourceString("ArgumentOutOfRange_SmallCapacity"));
system\resources\resourcewriter.cs (6)
315
bw.Write((int)resMgrHeaderBlob.
Length
);
318
bw.Write(resMgrHeaderBlob.GetBuffer(), 0, (int)resMgrHeaderBlob.
Length
);
502
int startOfDataSection = (int)(bw.Seek(0, SeekOrigin.Current) + nameSection.
Length
);
504
BCLDebug.Log("RESMGRFILEFORMAT", "Generate: start of DataSection: 0x" + startOfDataSection.ToString("x", CultureInfo.InvariantCulture) + " nameSection length: " + nameSection.
Length
);
508
bw.Write(nameSection.GetBuffer(), 0, (int)nameSection.
Length
);
687
if (ms.
Length
> Int32.MaxValue)
system\security\claims\ClaimsIdentity.cs (3)
1010
info.AddValue(ActorKey, Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.
Length
));
1027
info.AddValue(BootstrapContextKey, Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.
Length
));
1059
return Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.
Length
);
system\security\claims\ClaimsPrincipal.cs (3)
452
identities.Add(Convert.ToBase64String(claimsIdentityStream.GetBuffer(), 0, (int)claimsIdentityStream.
Length
));
461
identities.Add(Convert.ToBase64String(claimsIdentityStream.GetBuffer(), 0, (int)claimsIdentityStream.
Length
));
469
return Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.
Length
);
system\security\permissionset.cs (1)
2242
int countBytes = (int)ms.
Length
- 2;
PresentationCore (11)
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (11)
1786
if (cumulativeEncodedSize != localStream.
Length
)
1805
if (cumulativeEncodedSize != localStream.
Length
)
1819
if (cumulativeEncodedSize != localStream.
Length
)
1831
if (cumulativeEncodedSize != localStream.
Length
)
1840
if (cumulativeEncodedSize != localStream.
Length
)
1849
if (cumulativeEncodedSize != localStream.
Length
)
1858
if (cumulativeEncodedSize != localStream.
Length
)
1869
if (cumulativeEncodedSize != localStream.
Length
)
1879
if (cumulativeEncodedSize != localStream.
Length
)
2007
if (cbStroke != tempstrm.
Length
)
2014
ISFDebugTrace("Stroke size=" + tempstrm.
Length
);
PresentationFramework (5)
src\Framework\MS\Internal\Controls\StickyNote\StickyNoteContentControl.cs (4)
222
if (buffer.
Length
.CompareTo(MaxBufferSize) > 0)
227
node.InnerText = Convert.ToBase64String(buffer.GetBuffer(), 0, (int)buffer.
Length
);
391
if (buffer.
Length
.CompareTo(MaxBufferSize) > 0)
396
node.InnerText = Convert.ToBase64String(buffer.GetBuffer(), 0, (int)buffer.
Length
);
src\Framework\System\Windows\Interop\DocobjHost.cs (1)
1135
Invariant.Assert(loadStream.
Length
> 0, "Error reading journal stream from native IStream");
System.Activities (2)
System\Activities\Debugger\Symbol\WorkflowSymbol.cs (2)
126
byte[] buffer = new byte[ms.
Length
];
127
Array.Copy(ms.GetBuffer(), buffer, ms.
Length
);
System.Activities.DurableInstancing (2)
System\Activities\DurableInstancing\DefaultObjectSerializer.cs (2)
46
return new ArraySegment<byte>(memoryStream.GetBuffer(), 0, Convert.ToInt32(memoryStream.
Length
));
55
return new ArraySegment<byte>(memoryStream.GetBuffer(), 0, Convert.ToInt32(memoryStream.
Length
));
System.AddIn (4)
System\Addin\Hosting\AddInStore.cs (4)
1032
bw.Write(serializedData.
Length
);
1033
System.Diagnostics.Contracts.Contract.Assert(serializedData.
Length
<= Int32.MaxValue);
1034
bw.Write(serializedData.GetBuffer(), 0, (int)serializedData.
Length
);
1039
s.Write(cache.GetBuffer(), 0, (int) cache.
Length
);
System.Data.Services.Client (5)
System\Data\Services\Client\DataServiceContext.cs (5)
4279
if ((null != memory) && (0 < memory.
Length
))
4286
int bufferLength = checked((int)memory.
Length
) - bufferOffset;
5053
httpWebRequest.ContentLength = memory.
Length
- memory.Position;
5172
bufferLength = checked((int)stream.
Length
) - bufferOffset;
5729
int bufferLength = checked((int)memoryStream.
Length
) - bufferOffset;
System.IdentityModel (18)
System\IdentityModel\DeflateCookieTransform.cs (1)
70
if ( decompressedStream.
Length
> MaxDecompressedSize )
System\IdentityModel\Diagnostics\DigestTraceRecordHelper.cs (1)
66
string contentAsString = System.Text.Encoding.UTF8.GetString(contentBuffer, 0, (int)_logStream.
Length
);
System\IdentityModel\EnvelopedSignatureWriter.cs (5)
152
((IFragmentCapableXmlDictionaryWriter)base.InnerWriter).WriteFragment(_signatureFragment.GetBuffer(), 0, (int)_signatureFragment.
Length
);
153
((IFragmentCapableXmlDictionaryWriter)base.InnerWriter).WriteFragment(_endFragment.GetBuffer(), 0, (int)_endFragment.
Length
);
182
if (_writerStream == null || _writerStream.
Length
== 0)
187
if (_signatureFragment.
Length
!= 0)
192
Fx.Assert(_endFragment != null && _endFragment.
Length
== 0, SR.GetString(SR.ID8026));
System\IdentityModel\Protocols\WSTrust\WSTrustSerializationHelper.cs (1)
2817
if (ms.
Length
== 0)
System\IdentityModel\SamlDelegatingWriter.cs (4)
60
if ((this.elementCount == 0) && (this.endFragment.
Length
== 0))
84
((IFragmentCapableXmlDictionaryWriter)this.effectiveWriter).WriteFragment(this.startFragment.GetBuffer(), 0, (int)this.startFragment.
Length
);
85
((IFragmentCapableXmlDictionaryWriter)this.effectiveWriter).WriteFragment(this.signatureFragment.GetBuffer(), 0, (int)this.signatureFragment.
Length
);
86
((IFragmentCapableXmlDictionaryWriter)this.effectiveWriter).WriteFragment(this.endFragment.GetBuffer(), 0, (int)this.endFragment.
Length
);
System\IdentityModel\SignedXml.cs (1)
588
int bufferLength = (int)stream.
Length
;
System\IdentityModel\Tokens\BootstrapContext.cs (1)
167
info.AddValue(_tokenKey, Convert.ToBase64String(ms.GetBuffer(), 0, (int)ms.
Length
));
System\IdentityModel\Tokens\EncryptedSecurityTokenHandler.cs (1)
353
encryptedData.Encrypt(symmetricAlgorithm, plainTextBytes, 0, (int)plaintextStream.
Length
);
System\IdentityModel\Tokens\Saml2SecurityTokenHandler.cs (2)
2938
encryptedData.Encrypt(symmetricAlgorithm, plaintextStream.GetBuffer(), 0, (int)plaintextStream.
Length
);
4551
encryptedData.Encrypt(symmetricAlgorithm, plaintextStream.GetBuffer(), 0, (int)plaintextStream.
Length
);
System\IdentityModel\Tokens\SamlAssertion.cs (1)
312
effectiveReader = XmlDictionaryReader.CreateBinaryReader(stream.GetBuffer(), 0, (int)stream.
Length
, samlSerializer.DictionaryManager.ParentDictionary, reader.Quotas);
System.Runtime.Serialization (3)
System\Xml\XmlBinaryWriter.cs (2)
998
captureText = XmlConverter.Base64Encoding.GetString(captureStream.GetBuffer(), 0, (int)captureStream.
Length
);
1066
writer.WriteBase64Text(null, 0, captureStream.GetBuffer(), 0, (int)captureStream.
Length
);
System\Xml\XmlC14NWriter.cs (1)
125
if (elementStream != null && elementStream.
Length
> 512)
System.Security (1)
system\security\cryptography\xml\utils.cs (1)
662
return inputMS.
Length
;
System.ServiceModel (16)
System\ServiceModel\Channels\ContextProtocol.cs (1)
91
Convert.ToBase64String(stream.GetBuffer(), 0, (int)stream.
Length
),
System\ServiceModel\Configuration\IssuedTokenParametersElement.cs (1)
303
string commentString = new UTF8Encoding().GetString(memoryStream.GetBuffer(), 0, (int)memoryStream.
Length
);
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (1)
216
XmlDictionaryReader bufferReader = XmlDictionaryReader.CreateTextReader(memoryStream.GetBuffer(), 0, (int)memoryStream.
Length
, XmlDictionaryReaderQuotas.Max);
System\ServiceModel\Security\EncryptedHeaderXml.cs (1)
168
encryptedData.SetUpEncryption(algorithm, new ArraySegment<byte>(source.GetBuffer(), 0, (int) source.
Length
));
System\ServiceModel\Security\RequestSecurityToken.cs (1)
542
this.cachedWriteBufferLength = (int)stream.
Length
;
System\ServiceModel\Security\RequestSecurityTokenResponse.cs (1)
619
this.cachedWriteBufferLength = (int)stream.
Length
;
System\ServiceModel\Security\SecurityAppliedMessage.cs (6)
196
((IFragmentCapableXmlDictionaryWriter) writer).WriteFragment(this.startBodyFragment.GetBuffer(), 0, (int) this.startBodyFragment.
Length
);
207
((IFragmentCapableXmlDictionaryWriter) writer).WriteFragment(this.endBodyFragment.GetBuffer(), 0, (int) this.endBodyFragment.
Length
);
282
encryptedData.SetUpEncryption(algorithm, new ArraySegment<byte>(ms.GetBuffer(), 0, (int) ms.
Length
));
321
((IFragmentCapableXmlDictionaryWriter)fragmentingWriter).WriteFragment(this.startBodyFragment.GetBuffer(), 0, (int)this.startBodyFragment.
Length
);
322
((IFragmentCapableXmlDictionaryWriter)fragmentingWriter).WriteFragment(this.endBodyFragment.GetBuffer(), 0, (int)this.endBodyFragment.
Length
);
437
return new ArraySegment<byte>(this.stream.GetBuffer(), 0, (int) this.stream.
Length
);
System\ServiceModel\Security\SecurityVerifiedMessage.cs (2)
456
this.decryptedBuffer = ContextImportHelper.SpliceBuffers(decryptedBodyContent, stream.GetBuffer(), (int) stream.
Length
, 2);
501
byte[] splicedBuffer = SpliceBuffers(decryptedBuffer, stream.GetBuffer(), (int) stream.
Length
, wrappingDepth);
System\ServiceModel\Security\WSSecurityOneDotZeroSendSecurityHeader.cs (1)
563
encryptedData.SetUpEncryption(this.encryptingSymmetricAlgorithm, new ArraySegment<byte>(stream.GetBuffer(), 0, (int) stream.
Length
));
System\ServiceModel\Transactions\WhereaboutsReader.cs (1)
69
if (cTmToTmProtocols * STmToTmProtocolSize > mem.
Length
- mem.Position)
System.ServiceModel.Web (1)
System\ServiceModel\Dispatcher\JsonQueryStringConverter.cs (1)
175
return Encoding.UTF8.GetString(memoryStream.GetBuffer(), (int) memoryStream.Position, (int) memoryStream.
Length
);
System.Transactions (2)
System\Transactions\TransactionManager.cs (2)
549
returnValue = new byte[streamToWrite.
Length
];
552
streamToWrite.Read( returnValue, 0, Convert.ToInt32( streamToWrite.
Length
, CultureInfo.InvariantCulture ) );
System.Web (8)
Configuration\RemoteWebConfigurationHostStream.cs (3)
119
return _MemoryStream.
Length
;
147
if (offset + count > _MemoryStream.
Length
)
280
if (offset + count > _MemoryStream.
Length
)
Security\Cryptography\NetFXCryptoService.cs (1)
90
byte[] signature = signingAlgorithm.ComputeHash(memStream.GetBuffer(), 0, (int)memStream.
Length
);
State\SessionStateUtil.cs (2)
193
int serializedLength = (int)s.
Length
;
205
length = (int) s.
Length
;
UI\ObjectStateFormatter.cs (2)
775
int length = (int)ms.
Length
;
1181
int length = (int)ms.
Length
;
System.Web.DataVisualization (3)
WebForm\General\ChartHttpHandler.cs (3)
1616
stream.Seek(stream.
Length
- streamCut, SeekOrigin.Begin);
1624
stream.Seek(stream.
Length
- streamCut, SeekOrigin.Begin);
1649
data = new Byte[(int)stream.
Length
- streamCut];
System.Web.Services (1)
System\Web\Services\Discovery\DiscoveryRequestHandler.cs (1)
106
byte[] data = new byte[(int)memStream.
Length
];
System.Windows.Forms (4)
winforms\Managed\System\WinForms\AxHost.cs (2)
6587
length = (int)ms.
Length
;
6599
this.length = (int)ms.
Length
;
winforms\Managed\System\WinForms\Control.cs (1)
18043
byte[] bytes = new byte[(int)stream.
Length
];
winforms\Managed\System\WinForms\WebBrowser.cs (1)
307
return new MemoryStream(memoryStream.GetBuffer(), 0, (int)memoryStream.
Length
, false);
System.Workflow.ComponentModel (2)
AuthoringOM\Activity.cs (2)
1050
this.SetValue(SerializedStreamLengthProperty, memoryStream.
Length
> max ? memoryStream.
Length
: max);
System.Workflow.Runtime (9)
Hosting\WorkflowPersistenceService.cs (5)
57
using (MemoryStream compressedStream = new MemoryStream((int)stream.
Length
))
61
gzs.Write(stream.GetBuffer(), 0, (int)stream.
Length
);
68
executionContextInfo, executionContextInfo.ContextGuid, compressedStream.
Length
, timeElapsed);
71
Array.Resize<Byte>(ref result, Convert.ToInt32(compressedStream.
Length
));
93
state, stream.
Length
, timeElapsed);
System\Activities\Statements\InteropExecutor.cs (1)
388
Array.Resize<byte>(ref this.persistedActivityData, Convert.ToInt32(stream.
Length
));
Tracking\SqlTrackingService.cs (3)
2461
state = new byte[stream.
Length
];
2464
if (stream.
Length
> Int32.MaxValue)
2472
cbToRead = (int)stream.
Length
- totalRead;
WindowsBase (17)
Base\MS\Internal\IO\Packaging\CompoundFile\RightsManagementEncryptedStream.cs (2)
491
PackagingUtilities.CalculateOverlap(memStreamBlock.Offset, memStreamBlock.Stream.
Length
,
776
long dirtyBlockSize = memStreamBlock.Stream.
Length
;
Base\MS\Internal\IO\Packaging\SparseMemoryStream.cs (15)
237
PackagingUtilities.CalculateOverlap(memStreamBlock.Offset, (int)memStreamBlock.Stream.
Length
,
500
long gap = offset - (memStreamBlock.Offset + memStreamBlock.Stream.
Length
);
507
&& gap + length + memStreamBlock.Stream.
Length
<= Int32.MaxValue)
549
if (prevMemStreamBlock.Stream.
Length
+ count <= Int32.MaxValue) // Make sure there is enough space to append
560
Debug.Assert(prevMemStreamBlock.Stream.
Length
> 0);
567
Debug.Assert(prevMemStreamBlock.Stream.
Length
> 0);
603
&& (CanCollapseWithPreviousBlock(prevMemStreamBlock, memStreamBlock.Offset, memStreamBlock.Stream.
Length
)))
611
prevMemStreamBlock.Stream.Write(memStreamBlock.Stream.GetBuffer(), 0, (int) memStreamBlock.Stream.
Length
);
618
int leftoverSize = (int) (memStreamBlock.Stream.
Length
- blockOffset);
620
if (prevMemStreamBlock.Stream.
Length
+ leftoverSize <= Int32.MaxValue)
631
Debug.Assert(memStreamBlock.Stream.
Length
> 0);
681
Debug.Assert(newMemStreamBlock.Stream.
Length
> 0);
753
targetStream.Write(memStreamBlock.Stream.GetBuffer(), 0, (int)memStreamBlock.Stream.
Length
);
754
trackingPosition += memStreamBlock.Stream.
Length
;
893
return _offset + (_stream == null ? 0 : _stream.
Length
);