public FileLogger(string logPath, FileBase file) { if (logPath == null) throw new ArgumentNullException(nameof(logPath)); if (file == null) throw new ArgumentNullException(nameof(file)); _logPath = logPath; _file = file; }
public ReflectionBasedPluginLoader(ReflectionBasedPluginLoaderSettings settings, IYarpSerializer serializer, IYarpActivator activator, IAssemblyLoader assemblyLoader, DirectoryBase directory, FileBase file) { if (settings == null) throw new ArgumentNullException(nameof(settings)); if (serializer == null) throw new ArgumentNullException(nameof(serializer)); if (activator == null) throw new ArgumentNullException(nameof(activator)); if (assemblyLoader == null) throw new ArgumentNullException(nameof(assemblyLoader)); if (directory == null) throw new ArgumentNullException(nameof(directory)); if (file == null) throw new ArgumentNullException(nameof(file)); _settings = settings; _serializer = serializer; _activator = activator; _assemblyLoader = assemblyLoader; _directory = directory; _file = file; }
private ReflectionBasedPluginLoader CreateSut(ReflectionBasedPluginLoaderSettings settings, IYarpSerializer serializer = null, IYarpActivator activator = null, IAssemblyLoader loader = null, DirectoryBase directory = null, FileBase file = null) { var yarpSerializer = serializer ?? MockRepository.GenerateStub<IYarpSerializer>(); var yarpActivator = activator ?? MockRepository.GenerateStub<IYarpActivator>(); var assemblyLoader = loader ?? MockRepository.GenerateStub<IAssemblyLoader>(); var directoryBase = directory ?? MockRepository.GenerateStub<DirectoryBase>(); var fileBase = file ?? MockRepository.GenerateStub<FileBase>(); return new ReflectionBasedPluginLoader(settings, yarpSerializer, yarpActivator, assemblyLoader, directoryBase, fileBase); }
public ArgumentsLoggerFactory(FileBase file) { if (file == null) throw new ArgumentNullException(nameof(file)); _file = file; }