|
|
|
@ -36,9 +36,6 @@ namespace GBase.Factories |
|
|
|
/// <returns>A newly created instance of the implementation for <see cref="IGBaseTable"/></returns> |
|
|
|
/// <returns>A newly created instance of the implementation for <see cref="IGBaseTable"/></returns> |
|
|
|
public IGBaseTable Create(Type type) |
|
|
|
public IGBaseTable Create(Type type) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!typeof(INotifyGBaseEntryChanged).IsAssignableFrom(type)) |
|
|
|
|
|
|
|
throw new InvalidTableTypeException(type); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Type gBaseTableType = typeof(GBaseTable<>).MakeGenericType(type); |
|
|
|
Type gBaseTableType = typeof(GBaseTable<>).MakeGenericType(type); |
|
|
|
return (IGBaseTable) Activator.CreateInstance(gBaseTableType, _fileHandlerFactory, _gBaseColumnFactory); |
|
|
|
return (IGBaseTable) Activator.CreateInstance(gBaseTableType, _fileHandlerFactory, _gBaseColumnFactory); |
|
|
|
} |
|
|
|
} |
|
|
|
|