private void CheckAssembly(IAssemblyCheck checker, Assembly asm, List <AssemblyScanResult> result) { try { checker.Check(asm, result); } catch (Exception ex) { string message = "检查程序集时发生异常:" + asm.FullName; throw new AssemblyScanException(message, ex); } }
/// <summary> /// Initializes a new instance of the <see cref="DataView"/> class. /// </summary> /// <param name="source">The data source to use for this data view.</param> /// <param name="modInfoProvider">A service that provides the mod information.</param> /// <param name="assemblyCheck">An <see cref="IAssemblyCheck"/> service implementation.</param> /// <exception cref="ArgumentNullException">Thrown when any argument is null.</exception> public DataView(IEnumerable <TypeAccessActions> source, IModInfoProvider modInfoProvider, IAssemblyCheck assemblyCheck) { _source = source ?? throw new ArgumentNullException(nameof(source)); _modInfoProvider = modInfoProvider ?? throw new ArgumentNullException(nameof(modInfoProvider)); _assemblyCheck = assemblyCheck ?? throw new ArgumentNullException(nameof(assemblyCheck)); }