1 implementation of IJSStreamReference
Microsoft.JSInterop (1)
Implementation\JSStreamReference.cs (1)
9public sealed class JSStreamReference : JSObjectReference, IJSStreamReference
53 references to IJSStreamReference
Aspire.Dashboard (1)
Components\Layout\MainLayout.razor.cs (1)
278public async Task OpenTextVisualizerAsync(IJSStreamReference valueStream, string valueDescription)
BasicTestApp (2)
InteropTest\JSStreamReferenceInterop.cs (2)
12public static async Task<string> JSToDotNetStreamParameterAsync(IJSStreamReference jsStreamReference) 64public IJSStreamReference JSStreamReferenceVal { get; set; }
Microsoft.AspNetCore.Components.Server (2)
Circuits\RemoteJSDataStream.cs (1)
38IJSStreamReference jsStreamReference,
Circuits\RemoteJSRuntime.cs (1)
193protected override async Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.Components.Server.Tests (12)
Circuits\RemoteJSDataStreamTest.cs (12)
21var jsStreamReference = Mock.Of<IJSStreamReference>(); 161var jsStreamReference = Mock.Of<IJSStreamReference>(); 181var jsStreamReference = Mock.Of<IJSStreamReference>(); 212var jsStreamReference = Mock.Of<IJSStreamReference>(); 253var jsStreamReference = Mock.Of<IJSStreamReference>(); 347var jsStreamReference = Mock.Of<IJSStreamReference>();
Microsoft.AspNetCore.Components.Web (2)
Forms\InputFile\BrowserFileStream.cs (2)
17private IJSStreamReference? _jsStreamReference; 90_jsStreamReference = await _jsRuntime.InvokeAsync<IJSStreamReference>(
Microsoft.AspNetCore.Components.Web.Tests (4)
Forms\BrowserFileTest.cs (4)
37var jsStreamReference = new Mock<IJSStreamReference>(); 38jsRuntime.Setup(x => x.InvokeAsync<IJSStreamReference>(It.IsAny<string>(), It.IsAny<CancellationToken>(), It.IsAny<object[]>())) 61var jsStreamReference = new Mock<IJSStreamReference>(); 62jsRuntime.Setup(x => x.InvokeAsync<IJSStreamReference>(It.IsAny<string>(), It.IsAny<CancellationToken>(), It.IsAny<object[]>()))
Microsoft.AspNetCore.Components.WebAssembly (4)
Services\DefaultWebAssemblyJSRuntime.cs (1)
160protected override Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
src\Components\Shared\src\PullFromJSDataStream.cs (3)
15private readonly IJSStreamReference _jsStreamReference; 22IJSStreamReference jsStreamReference, 32IJSStreamReference jsStreamReference,
Microsoft.AspNetCore.Components.WebAssembly.Tests (4)
PullFromJSDataStreamTest.cs (4)
20var jsStreamReference = Mock.Of<IJSStreamReference>(); 107var jsStreamReference = Mock.Of<IJSStreamReference>();
Microsoft.AspNetCore.Components.WebView (4)
Services\WebViewJSRuntime.cs (1)
54protected override Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
src\Components\Shared\src\PullFromJSDataStream.cs (3)
15private readonly IJSStreamReference _jsStreamReference; 22IJSStreamReference jsStreamReference, 32IJSStreamReference jsStreamReference,
Microsoft.JSInterop (9)
Implementation\JSStreamReference.cs (2)
7/// Implements functionality for <see cref="IJSStreamReference"/>. 34async ValueTask<Stream> IJSStreamReference.OpenReadStreamAsync(long maxAllowedSize, CancellationToken cancellationToken)
Infrastructure\JSStreamReferenceJsonConverter.cs (4)
10internal sealed class JSStreamReferenceJsonConverter : JsonConverter<IJSStreamReference> 22=> typeToConvert == typeof(IJSStreamReference) || typeToConvert == typeof(JSStreamReference); 24public override IJSStreamReference? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 67public override void Write(Utf8JsonWriter writer, IJSStreamReference value, JsonSerializerOptions options)
JSRuntime.cs (2)
214/// <param name="jsStreamReference"><see cref="IJSStreamReference"/> to produce a data stream for.</param> 218protected internal virtual Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
23else if (typeof(TResult) == typeof(IJSStreamReference))
Microsoft.JSInterop.Tests (8)
Infrastructure\JSStreamReferenceJsonConverterTest.cs (8)
27var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 38var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 49var ex = Record.Exception(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 60var ex = Record.Exception(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 72var ex = Assert.Throws<JsonException>(() => JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)); 85var deserialized = (JSStreamReference)JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)!; 101var deserialized = (JSStreamReference)JsonSerializer.Deserialize<IJSStreamReference>(json, JsonSerializerOptions)!; 115var json = JsonSerializer.Serialize((IJSStreamReference)jsObjectRef, JsonSerializerOptions);
Microsoft.JSInterop.WebAssembly (1)
src\Shared\JSInterop\JSCallResultTypeHelper.cs (1)
23else if (typeof(TResult) == typeof(IJSStreamReference))