Add UnsupportedOSPlatformAttribute to ProtectedBrowserStorage APIs (#24800)
This commit is contained in:
parent
b8f906f0b8
commit
fa2d86e5b6
|
|
@ -4,6 +4,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Versioning;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.DataProtection;
|
using Microsoft.AspNetCore.DataProtection;
|
||||||
|
|
@ -11,9 +12,11 @@ using Microsoft.JSInterop;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Components.Web.Extensions
|
namespace Microsoft.AspNetCore.Components.Web.Extensions
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides mechanisms for storing and retrieving data in the browser storage.
|
/// Provides mechanisms for storing and retrieving data in the browser storage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnsupportedOSPlatform("browser")]
|
||||||
public abstract class ProtectedBrowserStorage
|
public abstract class ProtectedBrowserStorage
|
||||||
{
|
{
|
||||||
private readonly string _storeName;
|
private readonly string _storeName;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// 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.
|
// 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.AspNetCore.DataProtection;
|
||||||
using Microsoft.JSInterop;
|
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
|
/// See: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnsupportedOSPlatform("browser")]
|
||||||
public class ProtectedLocalStorage : ProtectedBrowserStorage
|
public class ProtectedLocalStorage : ProtectedBrowserStorage
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
// 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.
|
// 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.AspNetCore.DataProtection;
|
||||||
using Microsoft.JSInterop;
|
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
|
/// See: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[UnsupportedOSPlatform("browser")]
|
||||||
public class ProtectedSessionStorage : ProtectedBrowserStorage
|
public class ProtectedSessionStorage : ProtectedBrowserStorage
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue