/// <summary> /// Initializes new instance of the <see cref="ModuleInfo"/> class. /// </summary> /// <param name="assemblyPath">Full or relative path to the assembly file containing module's code</param> /// <param name="manifest">Module Manifest connected with assembly file defined in <paramref name="assemblyPath"/>. Can be null.</param> /// <param name="factory">IModuleManifest factory that connects the concrete implementation of ModuleManifest with in program ModuleManifest. Can be null</param> /// <exception cref="ArgumentException"> /// When <paramref name="assemblyPath"/> is <c>null</c> or empty. /// When <paramref name="manifest"/> or <paramref name="factory"/> is <c>null</c>. /// </exception> public ModuleInfo(string assemblyPath, ModuleManifest manifest, IModuleManifestFactory factory) { if (string.IsNullOrEmpty(assemblyPath)) { throw new ArgumentException("assemblyPath is required", assemblyPath); } if (manifest == null && factory == null) { throw new ArgumentException("manifest OR factory is required"); } _assemblyPath = assemblyPath; _manifest = manifest; _moduleManifestFactory = factory; }
/// <summary> /// Initializes new instance of the <see cref="ModuleInfo"/> class. /// </summary> /// <param name="assemblyPath">Full or relative path to the assembly file containing module's code</param> /// <param name="factory">IModuleManifest factory that connects the concrete implementation of ModuleManifest with in program ModuleManifest</param> public ModuleInfo(string assemblyPath, IModuleManifestFactory factory) : this(assemblyPath, null, factory) { }