stop using RuntimeInformation.IsOSPlatform(OSPlatform.Browser) (removed in upcoming builds) (#24652)
switch back to RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"))
This commit is contained in:
parent
6020fdef0b
commit
a196a6a0db
|
|
@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Components
|
|||
|
||||
static PlatformInfo()
|
||||
{
|
||||
IsWebAssembly = RuntimeInformation.IsOSPlatform(OSPlatform.Browser);
|
||||
IsWebAssembly = RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Microsoft.AspNetCore.Components.Web.Extensions
|
|||
protected ProtectedBrowserStorage(string storeName, IJSRuntime jsRuntime, IDataProtectionProvider dataProtectionProvider)
|
||||
{
|
||||
// Performing data protection on the client would give users a false sense of security, so we'll prevent this.
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Browser))
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")))
|
||||
{
|
||||
throw new PlatformNotSupportedException($"{GetType()} cannot be used when running in a browser.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Services
|
|||
/// <returns>A list of the loaded <see cref="Assembly"/></returns>
|
||||
public async Task<IEnumerable<Assembly>> LoadAssembliesAsync(IEnumerable<string> assembliesToLoad)
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Browser))
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")))
|
||||
{
|
||||
return await LoadAssembliesInClientAsync(assembliesToLoad);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue