Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/26/10 01:56:37 (14 years ago)
Author:
swagner
Message:

Adapted deployment service (#1165)

Location:
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced
Files:
1 added
1 deleted
3 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/AdminServiceClientFactory.cs

    r4493 r4495  
    2626namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
    2727  /// <summary>
    28   /// Factory class to generated administration client instances for the deployment service.
     28  /// Factory class to generate administration service client instances for the deployment service.
    2929  /// </summary>
    30   public static class AdminClientFactory {
     30  public static class AdminServiceClientFactory {
    3131    private static byte[] serverCrtData;
    3232
     
    3434    /// static constructor loads the embedded service certificate
    3535    /// </summary>
    36     static AdminClientFactory() {
     36    static AdminServiceClientFactory() {
    3737      var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.services.heuristiclab.com.cer");
    3838      serverCrtData = new byte[stream.Length];
     
    4141
    4242    /// <summary>
    43     /// Factory method to create new administration clients for the deployment service.
     43    /// Factory method to create new administration service clients for the deployment service.
    4444    /// Sets the connection string and user credentials from values provided in settings.
    4545    /// HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName
     
    4848    ///
    4949    /// </summary>
    50     /// <returns>A new instance of an adimistration client</returns>
    51     public static AdminClient CreateClient() {
    52       var client = new AdminClient();
     50    /// <returns>A new instance of an adimistration service client</returns>
     51    public static AdminServiceClient CreateClient() {
     52      var client = new AdminServiceClient();
    5353      client.ClientCredentials.UserName.UserName = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName;
    5454      client.ClientCredentials.UserName.Password = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword;
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/GenerateServiceClients.cmd

    r4493 r4495  
    1 #
    2 svcutil http://services.heuristiclab.com/Deployment-3.3/Update.svc/mex http://services.heuristiclab.com/Deployment-3.3/Admin.svc/mex  /language:C# /targetClientVersion:Version35 /out:DeploymentService /namespace:*,HeuristicLab.PluginInfrastructure.Advanced.DeploymentService /mergeConfig /config:../../app.config
     1echo off
     2
     3echo.
     4echo *******************************************************************************************
     5echo Generating DeploymentService clients
     6echo.
     7
     8svcutil.exe ^
     9  http://services.heuristiclab.com/Deployment-3.3/UpdateService.svc/mex ^
     10  http://services.heuristiclab.com/Deployment-3.3/AdminService.svc/mex ^
     11  /out:ServiceClients ^
     12  /namespace:*,HeuristicLab.PluginInfrastructure.Advanced.DeploymentService ^
     13  /targetClientVersion:Version35 ^
     14  /mergeConfig ^
     15  /config:..\..\app.config
     16
     17echo.
     18echo Generation of DeploymentService clients finished.
     19echo *******************************************************************************************
     20echo.
     21
     22pause
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/UpdateServiceClientFactory.cs

    r4493 r4495  
    2626namespace HeuristicLab.PluginInfrastructure.Advanced.DeploymentService {
    2727  /// <summary>
    28   /// Factory class to generated update client instances for the deployment service.
     28  /// Factory class to generate update service client instances for the deployment service.
    2929  /// </summary>
    30   public static class UpdateClientFactory {
     30  public static class UpdateServiceClientFactory {
    3131    private static byte[] serverCrtData;
    3232
     
    3434    /// static constructor loads the embedded service certificate
    3535    /// </summary>
    36     static UpdateClientFactory() {
     36    static UpdateServiceClientFactory() {
    3737      var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.services.heuristiclab.com.cer");
    3838      serverCrtData = new byte[stream.Length];
     
    4141
    4242    /// <summary>
    43     /// Factory method to create new update clients for the deployment service.
     43    /// Factory method to create new update service clients for the deployment service.
    4444    /// Sets the connection string and user credentials from values provided in settings.
    4545    /// HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName
     
    4848    ///
    4949    /// </summary>
    50     /// <returns>A new instance of an update client</returns>
    51     public static UpdateClient CreateClient() {
    52       var client = new UpdateClient();
     50    /// <returns>A new instance of an update service client</returns>
     51    public static UpdateServiceClient CreateClient() {
     52      var client = new UpdateServiceClient();
    5353      client.ClientCredentials.UserName.UserName = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationUserName;
    5454      client.ClientCredentials.UserName.Password = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocationPassword;
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/EditProductsView.cs

    r4482 r4495  
    6565    void deleteProductWorker_DoWork(object sender, DoWorkEventArgs e) {
    6666      var products = (IEnumerable<DeploymentService.ProductDescription>)e.Argument;
    67       var adminClient = DeploymentService.AdminClientFactory.CreateClient();
     67      var adminClient = DeploymentService.AdminServiceClientFactory.CreateClient();
    6868      // upload
    6969      try {
     
    8686      }
    8787      // refresh     
    88       var updateClient = DeploymentService.UpdateClientFactory.CreateClient();
     88      var updateClient = DeploymentService.UpdateServiceClientFactory.CreateClient();
    8989      try {
    9090        e.Result = new object[] { updateClient.GetProducts(), updateClient.GetPlugins() };
     
    131131    private void uploadChangedProductsWorker_DoWork(object sender, DoWorkEventArgs e) {
    132132      var products = (IEnumerable<DeploymentService.ProductDescription>)e.Argument;
    133       var adminClient = DeploymentService.AdminClientFactory.CreateClient();
     133      var adminClient = DeploymentService.AdminServiceClientFactory.CreateClient();
    134134      // upload
    135135      try {
     
    152152      }
    153153      // refresh     
    154       var updateClient = DeploymentService.UpdateClientFactory.CreateClient();
     154      var updateClient = DeploymentService.UpdateServiceClientFactory.CreateClient();
    155155      try {
    156156        e.Result = new object[] { updateClient.GetProducts(), updateClient.GetPlugins() };
     
    196196    #region event handlers for refresh products background worker
    197197    private void refreshProductsWorker_DoWork(object sender, DoWorkEventArgs e) {
    198       var updateClient = DeploymentService.UpdateClientFactory.CreateClient();
     198      var updateClient = DeploymentService.UpdateServiceClientFactory.CreateClient();
    199199      try {
    200200        e.Result = new object[] { updateClient.GetProducts(), updateClient.GetPlugins() };
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs

    r4482 r4495  
    4949    /// <returns></returns>
    5050    public IEnumerable<IPluginDescription> GetRemotePluginList() {
    51       var client = DeploymentService.UpdateClientFactory.CreateClient();
     51      var client = DeploymentService.UpdateServiceClientFactory.CreateClient();
    5252      try {
    5353        List<IPluginDescription> plugins = new List<IPluginDescription>(client.GetPlugins());
     
    7474    /// <returns></returns>
    7575    public IEnumerable<DeploymentService.ProductDescription> GetRemoteProductList() {
    76       var client = DeploymentService.UpdateClientFactory.CreateClient();
     76      var client = DeploymentService.UpdateServiceClientFactory.CreateClient();
    7777      try {
    7878        List<DeploymentService.ProductDescription> products = new List<DeploymentService.ProductDescription>(client.GetProducts());
     
    102102      OnPreInstall(args);
    103103      if (!args.Cancel) {
    104         var client = DeploymentService.UpdateClientFactory.CreateClient();
     104        var client = DeploymentService.UpdateServiceClientFactory.CreateClient();
    105105        try {
    106106          foreach (DeploymentService.PluginDescription plugin in plugins) {
     
    134134      OnPreUpdate(args);
    135135      if (!args.Cancel) {
    136         var client = DeploymentService.UpdateClientFactory.CreateClient();
     136        var client = DeploymentService.UpdateServiceClientFactory.CreateClient();
    137137        try {
    138138          foreach (DeploymentService.PluginDescription plugin in plugins) {
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Advanced/UploadPluginsView.cs

    r4482 r4495  
    7878    void refreshPluginsWorker_DoWork(object sender, DoWorkEventArgs e) {
    7979      // refresh available plugins
    80       var client = DeploymentService.UpdateClientFactory.CreateClient();
     80      var client = DeploymentService.UpdateServiceClientFactory.CreateClient();
    8181      try {
    8282        e.Result = client.GetPlugins();
     
    115115      // upload plugins
    116116      var selectedPlugins = (IEnumerable<IPluginDescription>)e.Argument;
    117       DeploymentService.AdminClient adminClient = DeploymentService.AdminClientFactory.CreateClient();
     117      DeploymentService.AdminServiceClient adminClient = DeploymentService.AdminServiceClientFactory.CreateClient();
    118118      Dictionary<IPluginDescription, DeploymentService.PluginDescription> cachedPluginDescriptions =
    119119        new Dictionary<IPluginDescription, DeploymentService.PluginDescription>();
     
    137137      }
    138138      // refresh available plugins
    139       var client = DeploymentService.UpdateClientFactory.CreateClient();
     139      var client = DeploymentService.UpdateServiceClientFactory.CreateClient();
    140140      try {
    141141        e.Result = client.GetPlugins();
Note: See TracChangeset for help on using the changeset viewer.