From 211d701bc515ed218d5644e098a84b85e35659a9 Mon Sep 17 00:00:00 2001 From: "a.bozhenov" Date: Tue, 3 Sep 2019 18:59:28 +0300 Subject: [PATCH] Update Bootstrap.cs --- ZeroLevel/Services/Bootstrap.cs | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/ZeroLevel/Services/Bootstrap.cs b/ZeroLevel/Services/Bootstrap.cs index 184b243..771788c 100644 --- a/ZeroLevel/Services/Bootstrap.cs +++ b/ZeroLevel/Services/Bootstrap.cs @@ -97,13 +97,8 @@ namespace ZeroLevel try { Log.Info($"[Bootstrap] Resolve assembly '{args.Name}' {args.Name}"); - if (args.Name.StartsWith("Newtonsoft.Json", StringComparison.Ordinal)) - { - return Assembly.LoadFile(Path.Combine(Configuration.BaseDirectory, "Newtonsoft.Json.dll")); - } string name = args.Name.Split(',')[0]; if (name.EndsWith(".resources")) return null; - foreach (string file in Directory. GetFiles(Path.Combine(Configuration.BaseDirectory), "*.dll", SearchOption.TopDirectoryOnly)) { @@ -113,30 +108,6 @@ namespace ZeroLevel return Assembly.LoadFile(file); } } - - //var candidates = Directory.GetFiles(Path.Combine(Configuration.BaseDirectory), name + ".dll", SearchOption.TopDirectoryOnly) - // ?.Select(s => Path.GetFileNameWithoutExtension(s)) - // ?.ToList(); - //if (candidates != null && candidates.Any()) - //{ - // int max = -1; int index = -1; - // for (int i = 0; i < candidates.Count; i++) - // { - // if (args.Name.IndexOf(candidates[i], StringComparison.OrdinalIgnoreCase) >= 0) - // { - // if (max < candidates[i].Length) - // { - // max = candidates[i].Length; - // index = i; - // } - // } - // } - // if (index != -1) - // { - - // return Assembly.LoadFile(Path.Combine(Configuration.BaseDirectory, candidates[index] + ".dll")); - // } - //} } catch (Exception ex) {