void LoadEndpoints() { Assembly a = Assembly.GetExecutingAssembly(); string[] namespaces = a.GetTypes().Select(x => x.Namespace).Distinct().ToArray(); foreach (string n in namespaces) { if (n.StartsWith("RemoteSigner.HttpData", StringComparison.InvariantCultureIgnoreCase)) { Logger.Log("HTTP Server", $"Loading REST calls for {n}"); restProcessor.Init(a, n); } } }
/// <summary> /// Load Assembly from assembly path /// </summary> /// <param name="assemblyPath"></param> public void LoadAssembly(string assemblyPath) { var assembly = GetAssembly(assemblyPath); var namespaces = assembly.GetTypes() .Select(x => x.Namespace) .Distinct() .ToList(); foreach (var nameSpace in namespaces) { Logger.Info("Loading REST calls for " + nameSpace); _restProcessor.Init(assembly, nameSpace); } }