Changeset 5131 for trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs
- Timestamp:
- 12/17/10 16:22:57 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs
r4482 r5131 72 72 /// <returns>Enumerable of the created instances.</returns> 73 73 public IEnumerable<object> GetInstances(Type type) { 74 return from t in GetTypes(type, true) 75 select Activator.CreateInstance(t); 74 List<object> instances = new List<object>(); 75 foreach (Type t in GetTypes(type, true)) { 76 object instance = null; 77 try { instance = Activator.CreateInstance(t); } 78 catch { } 79 if (instance != null) instances.Add(instance); 80 } 81 return instances; 76 82 } 77 83
Note: See TracChangeset
for help on using the changeset viewer.