Beispiel #1
0
 public DllFile(string path)
 {
     if (path == null)
     {
         throw new ArgumentNullException("path");
     }
     Name = Path.GetFileName(path);
     using (var file = VFS.Open(path))
     {
         provider = new ManagedDllProvider(file);
     }
 }
Beispiel #2
0
 public DllFile(string path, FileSystem vfs)
 {
     if (path == null)
     {
         throw new ArgumentNullException("path");
     }
     Name = Path.GetFileName(path);
     if (vfs == null)
     {
         using (var file = File.OpenRead(path))
         {
             provider = new ManagedDllProvider(file, Name);
         }
     }
     else
     {
         using (var file = vfs.Open(path))
         {
             provider = new ManagedDllProvider(file, Name);
         }
     }
 }