Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/CoreApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var builder = WebApplication.CreateBuilder();

builder.Services.AddSystemWebAdapters()
.WrapAspNetCoreSession()
.AddWrappedAspNetCoreSession()
.AddSessionSerializer()
.AddCustomSerialization();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.ComponentModel;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.SystemWebAdapters;
using Microsoft.AspNetCore.SystemWebAdapters.SessionState.Serialization;
Expand All @@ -12,7 +13,12 @@ namespace Microsoft.Extensions.DependencyInjection;

public static class ISystemWebAdapterBuilderSessionExtensions
{
[Obsolete("Prefer AddWrappedAspNetCoreSession instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static ISystemWebAdapterBuilder WrapAspNetCoreSession(this ISystemWebAdapterBuilder builder, Action<SessionOptions>? options = null)
=> builder.AddWrappedAspNetCoreSession(options);

public static ISystemWebAdapterBuilder AddWrappedAspNetCoreSession(this ISystemWebAdapterBuilder builder, Action<SessionOptions>? options = null)
{
ArgumentNullException.ThrowIfNull(builder);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static async Task<string> GetAsync(string endpoint)
services.AddRouting();
services.AddControllers();
services.AddSystemWebAdapters()
.WrapAspNetCoreSession();
.AddWrappedAspNetCoreSession();
services.AddDistributedMemoryCache();
})
.Configure(app =>
Expand Down