private static void LoadAssemblies(string[] assemblies, bool includeInSearch) { if (assemblies != null) { for (int i = 0; i < assemblies.Length; i++) { string text = assemblies[i]; try { AssemblyScanner.LoadAssembly(text, includeInSearch); } catch { throw new Exception(); } } } }
public IEnumerator <Type> GetEnumerator() { IEnumerable <Type> enumerable; if (WorkerAppDomain.InsideWorkerDomain) { enumerable = AssemblyScanner.GetSearchAssemblyTypes(); } else { enumerable = this.GetAllLoadedTypes(); } foreach (Type current in enumerable) { try { if (!current.IsDefined(this.attributeType, false)) { continue; } if (!this.IsSuitableType(current)) { throw new Exception("Resources.TypeScannerError"); } } catch (Exception obj) { if (this.customErrorHandler != null) { this.customErrorHandler(obj); continue; } throw; } yield return(current); } yield break; }