/// <summary> /// Initializes a new instance of the <see cref="CreateCommandHandler"/> class. /// </summary> /// <param name="module">The command handler module.</param> /// <param name="idGenerator">The generator for unique identifiers.</param> /// <param name="serializer">The JSON serializer.</param> /// <param name="factory">The factory.</param> public CreateCommandHandler( ICommandHandlerModule module, IIdGenerator idGenerator, IDefaultJsonSerializer serializer, IAppInfoFactory factory) : base(module) { this.idGenerator = idGenerator ?? throw new ArgumentNullException(nameof(idGenerator)); this.serializer = serializer ?? throw new ArgumentNullException(nameof(serializer)); this.factory = factory ?? throw new ArgumentNullException(nameof(factory)); }
/// <summary> /// Initializes a new instance of the <see cref="ImageService"/> class. /// </summary> /// <param name="loggerFactory">The logger factory.</param> /// <param name="configuration">The configuration.</param> /// <param name="fileSystemStrategy">The file system strategy.</param> /// <param name="appInfoFactory">The application information factory.</param> /// <param name="jsonWriter">The JSON writer.</param> /// <param name="imageExtractor">The image extractor.</param> /// <param name="gifImageWriter">The GIF image writer.</param> /// <exception cref="ArgumentNullException"> /// loggerFactory /// or /// configuration /// or /// fileSystemStrategy /// or /// appInfoFactory /// or /// jsonWriter /// or /// imageExtractor /// or /// gifImageWriter /// </exception> public ImageService( ILoggerFactory loggerFactory, IAmiConfigurationManager configuration, IFileSystemStrategy fileSystemStrategy, IAppInfoFactory appInfoFactory, IDefaultJsonWriter jsonWriter, IImageExtractor imageExtractor, IGifImageWriter gifImageWriter) { logger = loggerFactory?.CreateLogger <ImageService>(); if (logger == null) { throw new ArgumentNullException(nameof(loggerFactory)); } this.configuration = configuration; if (this.configuration == null) { throw new ArgumentNullException(nameof(configuration)); } this.fileSystemStrategy = fileSystemStrategy; if (this.fileSystemStrategy == null) { throw new ArgumentNullException(nameof(fileSystemStrategy)); } this.appInfoFactory = appInfoFactory; if (this.appInfoFactory == null) { throw new ArgumentNullException(nameof(appInfoFactory)); } this.jsonWriter = jsonWriter; if (this.jsonWriter == null) { throw new ArgumentNullException(nameof(jsonWriter)); } this.imageExtractor = imageExtractor; if (this.imageExtractor == null) { throw new ArgumentNullException(nameof(imageExtractor)); } this.gifImageWriter = gifImageWriter; if (this.gifImageWriter == null) { throw new ArgumentNullException(nameof(gifImageWriter)); } }
private void selectButton_Click(object sender, EventArgs e) { if (appListView.SelectedItems.Count > 0) { var factory = (IAppInfoFactory)appListView.SelectedItems[0].Tag; factory = factory.Configure(); if (factory == null) { return; } SelectedAppFactory = factory; DialogResult = DialogResult.OK; Close(); } }
/// <summary> /// Initializes a new instance of the <see cref="ImageService"/> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="archiveReader">The archive reader.</param> /// <param name="archiveExtractor">The archive extractor.</param> /// <param name="fileSystemStrategy">The file system strategy.</param> /// <param name="appInfoFactory">The application information factory.</param> /// <param name="jsonWriter">The JSON writer.</param> /// <param name="imageExtractor">The image extractor.</param> /// <param name="gifImageWriter">The GIF image writer.</param> public ImageService( IAppConfiguration configuration, IArchiveReader archiveReader, IArchiveExtractor archiveExtractor, IFileSystemStrategy fileSystemStrategy, IAppInfoFactory appInfoFactory, IDefaultJsonWriter jsonWriter, IImageExtractor imageExtractor, IGifImageWriter gifImageWriter) { this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); this.archiveReader = archiveReader ?? throw new ArgumentNullException(nameof(archiveReader)); this.archiveExtractor = archiveExtractor ?? throw new ArgumentNullException(nameof(archiveExtractor)); this.fileSystemStrategy = fileSystemStrategy ?? throw new ArgumentNullException(nameof(fileSystemStrategy)); this.appInfoFactory = appInfoFactory ?? throw new ArgumentNullException(nameof(appInfoFactory)); this.jsonWriter = jsonWriter ?? throw new ArgumentNullException(nameof(jsonWriter)); this.imageExtractor = imageExtractor ?? throw new ArgumentNullException(nameof(imageExtractor)); this.gifImageWriter = gifImageWriter ?? throw new ArgumentNullException(nameof(gifImageWriter)); }
/// <summary> /// Initializes a new instance of the <see cref="GetQueryHandler"/> class. /// </summary> /// <param name="factory">The factory.</param> /// <exception cref="ArgumentNullException">factory</exception> public GetQueryHandler(IAppInfoFactory factory) { this.factory = factory ?? throw new ArgumentNullException(nameof(factory)); }
/// <summary> /// Initializes a new instance of the <see cref="GetQueryHandler"/> class. /// </summary> /// <param name="module">The query handler module.</param> /// <param name="factory">The factory.</param> /// <exception cref="ArgumentNullException">factory</exception> public GetQueryHandler(IQueryHandlerModule module, IAppInfoFactory factory) : base(module) { this.factory = factory ?? throw new ArgumentNullException(nameof(factory)); }
/// <summary> /// Initializes a new instance of the <see cref="HomeController"/> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="appInfoFactory">The factory.</param> public HomeController(IOptions <ClientOptions> configuration, IAppInfoFactory appInfoFactory) { this.configuration = configuration; this.appInfoFactory = appInfoFactory; }
public ProducibleApp(IAppInfoFactory factory) { Factory = factory ?? throw new ArgumentNullException(nameof(factory)); }
public ProducibleDisplayableItem(IAppInfoFactory factory) { _factory = factory; }