partial void DeleteDependency(Dependency instance);
Exemplo n.º 2
0
    private void UpdatePlugin(DeploymentDataContext ctx, Plugin pluginEntity, PluginDescription pluginDescription) {
      // update plugin data
      pluginEntity.License = pluginDescription.LicenseText;
      pluginEntity.ContactName = pluginDescription.ContactName;
      pluginEntity.ContactEmail = pluginDescription.ContactEmail;

      // delete cached entry
      if (pluginDescriptions.ContainsKey(pluginEntity.Id)) pluginDescriptions.Remove(pluginEntity.Id);

      DeleteOldDependencies(ctx, pluginEntity);

      foreach (var dependency in pluginDescription.Dependencies) {
        var dependencyEntity = GetExistingPlugin(ctx, dependency.Name, dependency.Version);
        Dependency d = new Dependency();
        d.PluginId = pluginEntity.Id;
        d.DependencyId = dependencyEntity.Id;
        ctx.Dependencies.InsertOnSubmit(d);
      }
    }
 partial void UpdateDependency(Dependency instance);
 partial void InsertDependency(Dependency instance);
 partial void DeleteDependency(Dependency instance);
 partial void UpdateDependency(Dependency instance);
 partial void InsertDependency(Dependency instance);