public LooseMocksRegistrationSource(MockRepository repository, bool onlyInterfaces) { _onlyInterfaces = onlyInterfaces; _repository = repository; _createMethod = repository.GetType().GetMethod("Create", new Type[] { }); _createWithArgsMethod = repository.GetType().GetMethod("Create", new [] { typeof(object[]) }); }