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)
40var source = new MediaSource(PngBytes, "image/png", cacheKey: "png-1"); 57var s1 = new MediaSource(new byte[10], "image/png", cacheKey: "same"); 63var s2 = new MediaSource(new byte[20], "image/png", cacheKey: "same"); 99var s1 = new MediaSource(new byte[4], "image/png", "key-a"); 104var s2 = new MediaSource(new byte[6], "image/png", "key-b"); 120var s1 = new MediaSource(new byte[10], "image/png", "k1"); 126var s2 = new MediaSource(new byte[10], "image/png", "k2");
19 references to MediaSource
Microsoft.AspNetCore.Components.Web (12)
Media\FileDownload.cs (1)
112var source = Source;
Media\MediaComponentBase.cs (8)
41/// The <see cref="MediaSource"/> instance currently being processed (or <c>null</c> if none). 43internal MediaSource? _currentSource; 90[Parameter, EditorRequired] public required MediaSource Source { get; set; } 108var previousSource = Source; 134var source = Source; 184private async Task LoadMediaAsync(MediaSource? source, CancellationToken cancellationToken) 289private 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)
40var source = new MediaSource(PngBytes, "image/png", cacheKey: "png-1"); 57var s1 = new MediaSource(new byte[10], "image/png", cacheKey: "same"); 63var s2 = new MediaSource(new byte[20], "image/png", cacheKey: "same"); 99var s1 = new MediaSource(new byte[4], "image/png", "key-a"); 104var s2 = new MediaSource(new byte[6], "image/png", "key-b"); 120var s1 = new MediaSource(new byte[10], "image/png", "k1"); 126var s2 = new MediaSource(new byte[10], "image/png", "k2");