Ejemplo n.º 1
0
        private void DownloadAndInstall(IPluginRepository repository, PluginIdentifier id)
        {
            var content  = repository.DownloadPlugin(id);
            var fileName = $"{id.Id}.{id.Version}.tvp";
            var filePath = Path.Combine(Constants.DownloadedPluginsPath, fileName);
            var folder   = Path.GetDirectoryName(filePath);

            Directory.CreateDirectory(folder);
            File.WriteAllBytes(filePath, content);
        }
Ejemplo n.º 2
0
 public byte[] DownloadPlugin(PluginIdentifier pluginId)
 {
     return(_inner.DownloadPlugin(pluginId));
 }