Skip to content

Commit

Permalink
Alternative to #924: Changed max resolve limit to static for reflecti…
Browse files Browse the repository at this point in the history
…on access.
  • Loading branch information
tillig committed Jul 31, 2018
1 parent 54baabe commit 1bbcc06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Autofac/Core/Resolving/CircularDependencyDetector.cs
Expand Up @@ -25,6 +25,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;

Expand All @@ -35,7 +36,8 @@ internal class CircularDependencyDetector
/// <summary>
/// Catch circular dependencies that are triggered by post-resolve processing (e.g. 'OnActivated').
/// </summary>
private const int MaxResolveDepth = 50;
[SuppressMessage("SA1306", "SA1306", Justification = "Changed const to static on temporary basis until we can solve circular dependencies without a limit.")]
private static int MaxResolveDepth = 50;

private static string CreateDependencyGraphTo(IComponentRegistration registration, Stack<InstanceLookup> activationStack)
{
Expand Down

0 comments on commit 1bbcc06

Please sign in to comment.