10 instantiations of MediaSource
Microsoft.AspNetCore.Components.Web.Tests (10)
Media\FileDownloadTest.cs (3)
35
[nameof(FileDownload.Source)] = new
MediaSource
(SampleBytes, "application/octet-stream", "file-init"),
130
[nameof(FileDownload.Source)] = new
MediaSource
(SampleBytes, "application/octet-stream", "file-href"),
147
[nameof(FileDownload.Source)] = new
MediaSource
(SampleBytes, "application/octet-stream", key),
Media\ImageTest.cs (7)
40
var source = new
MediaSource
(PngBytes, "image/png", cacheKey: "png-1");
57
var s1 = new
MediaSource
(new byte[10], "image/png", cacheKey: "same");
63
var s2 = new
MediaSource
(new byte[20], "image/png", cacheKey: "same");
99
var s1 = new
MediaSource
(new byte[4], "image/png", "key-a");
104
var s2 = new
MediaSource
(new byte[6], "image/png", "key-b");
120
var s1 = new
MediaSource
(new byte[10], "image/png", "k1");
126
var s2 = new
MediaSource
(new byte[10], "image/png", "k2");
19 references to MediaSource
Microsoft.AspNetCore.Components.Web (12)
Media\FileDownload.cs (1)
112
var
source = Source;
Media\MediaComponentBase.cs (8)
41
/// The <see cref="
MediaSource
"/> instance currently being processed (or <c>null</c> if none).
43
internal
MediaSource
? _currentSource;
90
[Parameter, EditorRequired] public required
MediaSource
Source { get; set; }
108
var
previousSource = Source;
134
var
source = Source;
184
private async Task LoadMediaAsync(
MediaSource
? source, CancellationToken cancellationToken)
289
private static bool HasSameKey(
MediaSource
? a,
MediaSource
? b)
Media\MediaSource.cs (3)
7
/// Represents a single-use source for media data. A <see cref="
MediaSource
"/> corresponds to
35
/// Initializes a new instance of <see cref="
MediaSource
"/> with byte array data.
55
/// Initializes a new instance of <see cref="
MediaSource
"/> from an existing stream.
Microsoft.AspNetCore.Components.Web.Tests (7)
Media\ImageTest.cs (7)
40
var
source = new MediaSource(PngBytes, "image/png", cacheKey: "png-1");
57
var
s1 = new MediaSource(new byte[10], "image/png", cacheKey: "same");
63
var
s2 = new MediaSource(new byte[20], "image/png", cacheKey: "same");
99
var
s1 = new MediaSource(new byte[4], "image/png", "key-a");
104
var
s2 = new MediaSource(new byte[6], "image/png", "key-b");
120
var
s1 = new MediaSource(new byte[10], "image/png", "k1");
126
var
s2 = new MediaSource(new byte[10], "image/png", "k2");