Changeset 2810
- Timestamp:
- 02/16/10 10:47:53 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm/3.2/MainFormManager.cs
r2790 r2810 136 136 if (!typeof(IView).IsAssignableFrom(viewType)) 137 137 throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is not of type IView."); 138 if (viewType.IsGenericTypeDefinition) 139 throw new ArgumentException("View can not be created becaues given type " + viewType.ToString() + " is a generic type definition."); 138 Type view = viewType; 139 if (view.IsGenericTypeDefinition) 140 view = TransformGenericTypeDefinition(view, content.GetType()); 140 141 141 return (IView)Activator.CreateInstance(view Type, content);142 return (IView)Activator.CreateInstance(view, content); 142 143 } 143 144
Note: See TracChangeset
for help on using the changeset viewer.