diff --git a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs index 71a06a15ec..1d2610079c 100644 --- a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs +++ b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedBrowserStorage.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Concurrent; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Text.Json; using System.Threading.Tasks; using Microsoft.AspNetCore.DataProtection; @@ -11,9 +12,11 @@ using Microsoft.JSInterop; namespace Microsoft.AspNetCore.Components.Web.Extensions { + /// /// Provides mechanisms for storing and retrieving data in the browser storage. /// + [UnsupportedOSPlatform("browser")] public abstract class ProtectedBrowserStorage { private readonly string _storeName; diff --git a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedLocalStorage.cs b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedLocalStorage.cs index 68229e0f18..08a529c948 100644 --- a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedLocalStorage.cs +++ b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedLocalStorage.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Runtime.Versioning; using Microsoft.AspNetCore.DataProtection; using Microsoft.JSInterop; @@ -15,6 +16,7 @@ namespace Microsoft.AspNetCore.Components.Web.Extensions /// /// See: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage /// + [UnsupportedOSPlatform("browser")] public class ProtectedLocalStorage : ProtectedBrowserStorage { /// diff --git a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedSessionStorage.cs b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedSessionStorage.cs index 452e4e2bb5..8f03d50802 100644 --- a/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedSessionStorage.cs +++ b/src/Components/Web.Extensions/src/ProtectedBrowserStorage/ProtectedSessionStorage.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +using System.Runtime.Versioning; using Microsoft.AspNetCore.DataProtection; using Microsoft.JSInterop; @@ -15,6 +16,7 @@ namespace Microsoft.AspNetCore.Components.Web.Extensions /// /// See: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage /// + [UnsupportedOSPlatform("browser")] public class ProtectedSessionStorage : ProtectedBrowserStorage { ///