24 references to Source
Microsoft.AspNetCore.Components.Web (13)
Media\FileDownload.cs (3)
101if (Source is null || !IsInteractive || string.IsNullOrWhiteSpace(FileName)) 109_currentSource = Source; 112var source = Source;
Media\Image.cs (2)
33var showInitial = Source != null && _currentSource == null && string.IsNullOrEmpty(_currentObjectUrl) && !_hasError; 55var defaultShowInitial = Source != null && _currentSource == null && string.IsNullOrEmpty(_currentObjectUrl) && !_hasError;
Media\MediaComponentBase.cs (6)
82/// and whenever the <see cref="Source"/> changes. Override and return <c>false</c> for components 108var previousSource = Source; 112if (Source is null) 114throw new InvalidOperationException($"{nameof(MediaComponentBase)}.{nameof(Source)} is required."); 124if (!HasSameKey(previousSource, Source)) 134var source = Source;
Media\Video.cs (2)
33var showInitial = Source != null && _currentSource == null && string.IsNullOrEmpty(_currentObjectUrl) && !_hasError; 55var defaultShowInitial = Source != null && _currentSource == null && string.IsNullOrEmpty(_currentObjectUrl) && !_hasError;
Microsoft.AspNetCore.Components.Web.Tests (11)
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 (8)
43[nameof(Image.Source)] = source, 60[nameof(Image.Source)] = s1, 66[nameof(Image.Source)] = s2, 84[nameof(Image.Source)] = null, 102[nameof(Image.Source)] = s1, 107[nameof(Image.Source)] = s2, 123[nameof(Image.Source)] = s1, 129[nameof(Image.Source)] = s2,