Beispiel #1
0
        private Assembly LoadFromAssemblyPath(string assemblyPath)
        {
            Assembly assembly = null;
            var      file     = _fileSystem.GetFileInfo(assemblyPath);

            if (file.Exists)
            {
                try
                {
                    assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(assemblyPath);
                }
                catch
                {
                    // Silently handle
                }
            }

            return(assembly);
        }
Beispiel #2
0
 public IFileInfo GetFileInfo(string path)
 {
     return(_fileSystem.GetFileInfo(path));
 }