Add UnsupportedOSPlatformAttribute to ProtectedBrowserStorage APIs (#24800)
This commit is contained in:
parent
b8f906f0b8
commit
fa2d86e5b6
|
|
@ -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
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Provides mechanisms for storing and retrieving data in the browser storage.
|
||||
/// </summary>
|
||||
[UnsupportedOSPlatform("browser")]
|
||||
public abstract class ProtectedBrowserStorage
|
||||
{
|
||||
private readonly string _storeName;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
/// </summary>
|
||||
[UnsupportedOSPlatform("browser")]
|
||||
public class ProtectedLocalStorage : ProtectedBrowserStorage
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
/// </summary>
|
||||
[UnsupportedOSPlatform("browser")]
|
||||
public class ProtectedSessionStorage : ProtectedBrowserStorage
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue