Code cleanup.
This commit is contained in:
@@ -145,7 +145,7 @@ namespace Cryville.Common {
|
||||
/// <returns>An array containing all the subclasses of the type in the current app domain.</returns>
|
||||
public static Type[] GetSubclassesOf<T>() where T : class {
|
||||
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
|
||||
IEnumerable<Type> r = new List<Type>();
|
||||
IEnumerable<Type> r = Enumerable.Empty<Type>();
|
||||
foreach (var a in assemblies)
|
||||
r = r.Concat(a.GetTypes().Where(
|
||||
t => t.IsClass
|
||||
|
@@ -11,8 +11,8 @@ namespace Cryville.Crtr.Event {
|
||||
|
||||
Dictionary<EventContainer, ContainerState> states
|
||||
= new Dictionary<EventContainer, ContainerState>();
|
||||
List<EventContainer> activeContainers
|
||||
= new List<EventContainer>();
|
||||
HashSet<EventContainer> activeContainers
|
||||
= new HashSet<EventContainer>();
|
||||
HashSet<ContainerState> workingStates
|
||||
= new HashSet<ContainerState>();
|
||||
HashSet<ContainerState> invalidatedStates
|
||||
@@ -29,7 +29,7 @@ namespace Cryville.Crtr.Event {
|
||||
var r = (EventBus)MemberwiseClone();
|
||||
r.prototype = this;
|
||||
r.states = new Dictionary<EventContainer, ContainerState>();
|
||||
r.activeContainers = new List<EventContainer>();
|
||||
r.activeContainers = new HashSet<EventContainer>();
|
||||
r.workingStates = new HashSet<ContainerState>();
|
||||
r.invalidatedStates = new HashSet<ContainerState>();
|
||||
r.tempEvents = new List<StampedEvent>();
|
||||
|
Reference in New Issue
Block a user