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