4 instantiations of DotNetStreamReference
BasicTestApp (1)
InteropTest\DotNetStreamReferenceInterop.cs (1)
20var streamRef = new DotNetStreamReference(dataStream);
Microsoft.JSInterop.Tests (3)
Infrastructure\DotNetStreamReferenceJsonConverterTest.cs (2)
34var streamRef = new DotNetStreamReference(new MemoryStream()); 47var streamRef = new DotNetStreamReference(new MemoryStream());
JSRuntimeTest.cs (1)
404var streamRef = new DotNetStreamReference(new MemoryStream());
29 references to DotNetStreamReference
BasicTestApp (4)
InteropTest\DotNetStreamReferenceInterop.cs (4)
11public static DotNetStreamReference GetDotNetStreamReference() 20var streamRef = new DotNetStreamReference(dataStream); 25public static Task<DotNetStreamReference> GetDotNetStreamReferenceAsync() 53public DotNetStreamReference DotNetStreamReferenceVal { get; set; }
Microsoft.AspNetCore.Components.Server (9)
Circuits\CircuitHost.cs (4)
476public async Task<int> SendDotNetStreamAsync(DotNetStreamReference dotNetStreamReference, long streamId, byte[] buffer) 496public async Task<DotNetStreamReference> TryClaimPendingStream(long streamId) 501DotNetStreamReference dotNetStreamReference = null; 505return await Renderer.Dispatcher.InvokeAsync<DotNetStreamReference>(() =>
Circuits\RemoteJSRuntime.cs (4)
21private readonly ConcurrentDictionary<long, DotNetStreamReference> _pendingDotNetToJSStreams = new(); 153protected override async Task TransmitStreamAsync(long streamId, DotNetStreamReference dotNetStreamReference) 167if (_pendingDotNetToJSStreams.TryRemove(streamId, out var timedOutStream) && !timedOutStream.LeaveOpen) 176public bool TryClaimPendingStreamForSending(long streamId, out DotNetStreamReference pendingStream)
ComponentHub.cs (1)
277var dotNetStreamReference = await circuitHost.TryClaimPendingStream(streamId);
Microsoft.AspNetCore.Components.WebAssembly (2)
Services\DefaultWebAssemblyJSRuntime.cs (1)
164protected override Task TransmitStreamAsync(long streamId, DotNetStreamReference dotNetStreamReference)
src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
15internal static async Task TransmitStreamAsync(IJSRuntime runtime, string methodIdentifier, long streamId, DotNetStreamReference dotNetStreamReference)
Microsoft.AspNetCore.Components.WebView (2)
Services\WebViewJSRuntime.cs (1)
57protected override Task TransmitStreamAsync(long streamId, DotNetStreamReference dotNetStreamReference)
src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
15internal static async Task TransmitStreamAsync(IJSRuntime runtime, string methodIdentifier, long streamId, DotNetStreamReference dotNetStreamReference)
Microsoft.JSInterop (6)
Infrastructure\DotNetStreamReferenceJsonConverter.cs (4)
9internal sealed class DotNetStreamReferenceJsonConverter : JsonConverter<DotNetStreamReference> 20public override DotNetStreamReference Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 21=> throw new NotSupportedException($"{nameof(DotNetStreamReference)} cannot be supplied from JavaScript to .NET because the stream contents have already been transferred."); 23public override void Write(Utf8JsonWriter writer, DotNetStreamReference value, JsonSerializerOptions options)
JSRuntime.cs (2)
273protected internal virtual Task TransmitStreamAsync(long streamId, DotNetStreamReference dotNetStreamReference) 283internal long BeginTransmittingStream(DotNetStreamReference dotNetStreamReference)
Microsoft.JSInterop.Tests (6)
Infrastructure\DotNetStreamReferenceJsonConverterTest.cs (3)
26var ex = Assert.Throws<NotSupportedException>(() => JsonSerializer.Deserialize<DotNetStreamReference>(json, JsonSerializerOptions)); 34var streamRef = new DotNetStreamReference(new MemoryStream()); 47var streamRef = new DotNetStreamReference(new MemoryStream());
JSRuntimeTest.cs (2)
404var streamRef = new DotNetStreamReference(new MemoryStream()); 495protected internal override Task TransmitStreamAsync(long streamId, DotNetStreamReference dotNetStreamReference)
TestJSRuntime.cs (1)
25protected internal override Task TransmitStreamAsync(long streamId, DotNetStreamReference dotNetStreamReference)