public bool ActivateFor(Row row) { if (row.GetType().GetCustomAttribute<CaptureLogAttribute>() == null) return false; captureLogHandler = (ICaptureLogHandler)Activator.CreateInstance( typeof(CaptureLogHandler<>).MakeGenericType(row.GetType())); return true; }
public bool ActivateFor(Row row) { if (row.GetType().GetCustomAttribute <CaptureLogAttribute>() == null) { return(false); } captureLogHandler = (ICaptureLogHandler)Activator.CreateInstance( typeof(CaptureLogHandler <>).MakeGenericType(row.GetType())); return(true); }