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
7 changes: 2 additions & 5 deletions bench/Polly.Benchmarks/Cache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ public Task<object> Cache_Asynchronous_Miss() =>
private static Task<object> GetObjectAsync(CancellationToken cancellationToken) =>
Task.FromResult(new object());

private sealed class MemoryCacheProvider : ISyncCacheProvider, IAsyncCacheProvider
private sealed class MemoryCacheProvider(IMemoryCache memoryCache) : ISyncCacheProvider, IAsyncCacheProvider
{
private readonly IMemoryCache _cache;

public MemoryCacheProvider(IMemoryCache memoryCache) =>
_cache = memoryCache;
private readonly IMemoryCache _cache = memoryCache;

public (bool, object?) TryGet(string key)
{
Expand Down
2 changes: 1 addition & 1 deletion samples/Intro.FSharp/Intro.FSharp.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Intro.VisualBasic/Intro.VisualBasic.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/Polly/Context.Dictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
/// Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added.
/// <remarks>Do not re-use an instance of <see cref="Context"/> across more than one execution.</remarks>
/// </summary>
#pragma warning disable CA1010, CA1710
public partial class Context : IDictionary<string, object>, IDictionary, IReadOnlyDictionary<string, object>
#pragma warning restore CA1010, CA1710
{
// For an individual execution through a policy or policywrap, it is expected that all execution steps (for example executing the user delegate, invoking policy-activity delegates such as onRetry, onBreak, onTimeout etc) execute sequentially.
// Therefore, this class is intentionally not constructed to be safe for concurrent access from multiple threads.
Expand Down
2 changes: 1 addition & 1 deletion src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<MutationScore>100</MutationScore>
<IncludePollyUsings>true</IncludePollyUsings>
<!-- We do not plan on enabling nullable annotations for Polly -->
<NoWarn>$(NoWarn);RS0037</NoWarn>
<NoWarn>$(NoWarn);CA1510;RS0037</NoWarn>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions test/Polly.Specs/Helpers/Caching/StubSerialized.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Polly.Specs.Helpers.Caching;

/// <summary>
/// An intentionally naive class to be the simplest thing possible to support tests around serializing cache providers. This serialization does nothing but wrap the object to be serialized!
/// An intentionally naive class to be the simplest thing possible to support tests around serializing cache providers. This serialization does nothing but wrap the object to be serialized.
/// </summary>
/// <typeparam name="TOriginal">The type of the item being 'serialized'.</typeparam>
internal class StubSerialized<TOriginal>
Expand All @@ -13,7 +13,7 @@ public StubSerialized(TOriginal? original) =>
}

/// <summary>
/// An intentionally naive class to be the simplest thing possible to support tests around serializing cache providers. This serialization does nothing but wrap the object to be serialized!
/// An intentionally naive class to be the simplest thing possible to support tests around serializing cache providers. This serialization does nothing but wrap the object to be serialized.
/// </summary>
internal class StubSerialized : StubSerialized<object>
{
Expand Down
Loading