Skip to content

Commit

Permalink
Fixed Conditions.ComputeRestarts()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Ignatiev committed Aug 24, 2012
1 parent 72dd7b6 commit 60bcfa3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Conditions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using System.Threading;

Expand Down Expand Up @@ -201,16 +203,12 @@ public static object InvokeRestart(string name, object param)
return restart(param);
}

public static IDictionary<string, RestartBindCallback> ComputeRestarts()
public static IEnumerable<Tuple<string, RestartBindCallback>> ComputeRestarts()
{
var restarts = new Dictionary<string, RestartBindCallback>();
Thread currentThread = Thread.CurrentThread;
var clusters = _restartStacks.GetOrCreateValue(currentThread);
foreach (var c in clusters)
{
restarts.Add(c.Item1, c.Item2);
}
return restarts;
var clusters = _restartStacks.GetOrCreateValue(currentThread);
return clusters.AsEnumerable();
}
}
}

0 comments on commit 60bcfa3

Please sign in to comment.