using System; using System.Collections.Generic; using System.Reflection; using MbUnit.Core.Remoting; namespace MbUnit.ReSharperRunner.MbUnit { public static class FixtureExplorerFactory { public static Dictionary explorer = new Dictionary(); public static FixtureExplorer GetExplorer(Assembly assembly) { FixtureExplorer fixtureExplorer; if (!explorer.TryGetValue(assembly.GetType(), out fixtureExplorer)) { fixtureExplorer = new FixtureExplorer(assembly); // explorer[assembly.GetType()] = fixtureExplorer; } return fixtureExplorer; } public static void ClearExplorer(Assembly assembly) { if (explorer.ContainsKey(assembly.GetType())) explorer.Remove(assembly.GetType()); } } }