64 references to Null
aspire (1)
Certificates\CertificateGeneration\CertificateProcessRunner.cs (1)
64await reader.BaseStream.CopyToAsync(Stream.Null, cancellationToken).ConfigureAwait(false);
Aspire.Cli.Tests (2)
Mcp\AppHostConnectionSelectionLogicTests.cs (1)
68var rpc = new JsonRpc(Stream.Null);
Mcp\ListAppHostsToolTests.cs (1)
175var rpc = new JsonRpc(Stream.Null);
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedWriteStream.cs (1)
47Contract.Assert(stream != Null, "stream!=Null");
ILCompiler.Compiler (5)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (5)
672Stream = Stream.Null, 710if (section.RelocationStream != Stream.Null) 782if (section.RelocationStream != Stream.Null) 840section.RelocationStream != Stream.Null) 919public Stream RelocationStream { get; set; } = Stream.Null;
ILCompiler.ReadyToRun (5)
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\ElfObjectWriter.cs (5)
672Stream = Stream.Null, 710if (section.RelocationStream != Stream.Null) 782if (section.RelocationStream != Stream.Null) 840section.RelocationStream != Stream.Null) 919public Stream RelocationStream { get; set; } = Stream.Null;
Microsoft.AspNetCore.Http (3)
DefaultHttpContext.cs (1)
56Features.Set<IHttpResponseBodyFeature>(new StreamResponseBodyFeature(Stream.Null));
Features\HttpRequestFeature.cs (1)
17Body = Stream.Null;
Features\HttpResponseFeature.cs (1)
18Body = Stream.Null;
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
1045features.Set<IHttpResponseBodyFeature>(new StreamResponseBodyFeature(Stream.Null));
Microsoft.AspNetCore.Http.Features (1)
IHttpRequestFeature.cs (1)
87/// <see cref="Stream.Null"/> may be used to represent an empty request body.
Microsoft.AspNetCore.HttpLogging (2)
ResponseBufferingStream.cs (2)
33: base(Stream.Null, NullLogger.Instance) 69_innerStream = Stream.Null;
Microsoft.AspNetCore.Owin (2)
OwinEnvironment.cs (2)
416{ OwinConstants.RequestBody, new FeatureMap<IHttpRequestFeature>(feature => feature.Body, () => Stream.Null, (feature, value) => feature.Body = (Stream)value) }, 483{ OwinConstants.ResponseBody, new FeatureMap<IHttpResponseBodyFeature>(feature => feature.Stream, () => Stream.Null, (feature, value) => context.Response.Body = (Stream)value) }, // DefaultHttpResponse.Body.Set has built in logic to handle replacing the feature.
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\Request.cs (1)
255public Stream Body => EnsureRequestStream() ?? Stream.Null;
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http3\Http3ControlStream.cs (1)
321return Input.CopyToAsync(Stream.Null);
Microsoft.AspNetCore.TestHost (2)
RequestBuilder.cs (1)
56_req.Content = new StreamContent(Stream.Null);
WebSocketClient.cs (1)
88request.Body = Stream.Null;
Microsoft.Build (1)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
183return new(recordKind, Stream.Null);
Microsoft.Extensions.AI.Tests (4)
SpeechToText\OpenTelemetrySpeechToTextClientTests.cs (4)
105await client.GetStreamingTextAsync(Stream.Null, options).ToSpeechToTextResponseAsync() : 106await client.GetTextAsync(Stream.Null, options); 188await foreach (var update in client.GetStreamingTextAsync(Stream.Null)) 197client.GetTextAsync(Stream.Null));
Microsoft.ML.Data (1)
DataLoadSave\Binary\BinarySaver.cs (1)
784IValueWriter<T> specificWriter = codec.OpenWriter(Stream.Null);
Mono.Cecil (4)
Mono.Cecil.Cil\PortablePdb.cs (1)
496 using (var crypto_stream = new CryptoStream (Stream.Null, sha256, CryptoStreamMode.Write)) {
Mono.Security.Cryptography\CryptoService.cs (3)
100 using (var crypto_stream = new CryptoStream (Stream.Null, sha1, CryptoStreamMode.Write)) { 139 using (var crypto_stream = new CryptoStream (Stream.Null, sha1, CryptoStreamMode.Write)) 149 using (var crypto_stream = new CryptoStream (Stream.Null, sha1, CryptoStreamMode.Write)) {
NuGet.Packaging (2)
PackageCreation\Authoring\EmptyFrameworkFolderFile.cs (1)
18base(() => Stream.Null)
Signing\Utility\SigningUtility.cs (1)
190using (var package = new SignedPackageArchive(options.InputPackageStream, Stream.Null))
PresentationCore (2)
System\Windows\Media\Imaging\BitmapDecoder.cs (2)
1039if ((bitmapStream == null) || (bitmapStream == System.IO.Stream.Null)) 1550bitmapStream = System.IO.Stream.Null;
PresentationFramework (1)
MS\Internal\Ink\ISFClipboardData.cs (1)
82if ( stream != null && stream != Stream.Null )
System.Console (2)
System\Console.cs (1)
239return outputStream == Stream.Null ?
System\ConsolePal.Unix.cs (1)
113inputStream == Stream.Null ?
System.Net.Http (2)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (2)
664await stream.CopyToAsync(Stream.Null).ConfigureAwait(false); 676await stream.CopyToAsync(Stream.Null).ConfigureAwait(false);
System.Net.HttpListener (1)
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
321_inputStream = Stream.Null;
System.Net.Requests (4)
System\Net\FileWebResponse.cs (1)
31_stream = Stream.Null;
System\Net\FtpWebResponse.cs (1)
72if (stream == null || stream == Stream.Null || stream is EmptyStream)
System\Net\HttpWebRequest.cs (1)
1117return Stream.Null;
System\Net\HttpWebResponse.cs (1)
352return Stream.Null;
System.Net.Security (1)
System\Net\Security\AuthenticatedStream.cs (1)
17if (innerStream == null || innerStream == Stream.Null)
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (1)
31OutStream = Stream.Null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\File.cs (1)
190/// For scenarios that don't require raw file handles or descriptors, consider using <see cref="Stream.Null"/> instead.
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
126_stream = Stream.Null;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
191_stream = Stream.Null;
System.Private.Xml (1)
System\Xml\Xsl\XmlQueryTypeFactory.cs (1)
1164type.GetObjectData(new BinaryWriter(Stream.Null));
System.Security.Cryptography (2)
System\Security\Cryptography\PasswordDeriveBytes.cs (2)
233using (CryptoStream cs = new CryptoStream(Stream.Null, _hash, CryptoStreamMode.Write)) 246using (CryptoStream cs = new CryptoStream(Stream.Null, _hash, CryptoStreamMode.Write))
System.ServiceModel.Primitives (2)
System\ServiceModel\Channels\BufferedReadStream.cs (1)
56Contract.Assert(stream != Null, "stream != Stream.Null");
System\ServiceModel\Channels\BufferedWriteStream.cs (1)
49Contract.Assert(stream != Null, "stream != Stream.Null");
System.Speech (3)
Synthesis\SpeechSynthesizer.cs (3)
224if (_outputStream != Stream.Null) 226VoiceSynthesizer.SetOutput(Stream.Null, null, true); 236_outputStream = Stream.Null;