Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2783 for trunk


Ignore:
Timestamp:
02/12/10 10:16:02 (15 years ago)
Author:
gkronber
Message:

Refreshed service reference in plugin infrastructure. #860 (Deployment server for plugin installation from web locations)

Location:
trunk/sources/HeuristicLab.PluginInfrastructure
Files:
12 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManager.cs

    r2780 r2783  
    2727using System.IO;
    2828using System.ComponentModel;
    29 using HeuristicLab.PluginInfrastructure.UpdateLocationReference;
     29using UpdateService = HeuristicLab.PluginInfrastructure.PluginUpdateService;
    3030using System.Reflection;
    3131
     
    185185      var pluginDescriptions = from name in pluginNames
    186186                               select GetPluginDescription(name);
    187       Dictionary<PluginInformation, string> matchingPlugins = new Dictionary<PluginInformation, string>();
     187      Dictionary<UpdateService.PluginDescription, string> matchingPlugins = new Dictionary<UpdateService.PluginDescription, string>();
    188188      foreach (var updateLocation in HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocations) {
    189         using (UpdateLocationClient client = new UpdateLocationClient("", updateLocation)) {
     189        using (var client = new UpdateService.UpdateClient("", updateLocation)) {
    190190          var updateLocationMatchingPlugins = from desc in pluginDescriptions
    191                                               from info in client.GetAvailablePluginsByName(desc.Name)
     191                                              from info in client.GetPlugins()
     192                                              where desc.Name == info.Name
    192193                                              select info;
    193           foreach (PluginInformation info in updateLocationMatchingPlugins) {
    194             // keep only the highest version and most recent build of any plugin
     194          foreach (UpdateService.PluginDescription info in updateLocationMatchingPlugins) {
     195            // keep only the highest version of any plugin
    195196            var existingPlugin = matchingPlugins.Keys.FirstOrDefault(x => x.Name == info.Name);
    196             if (existingPlugin == null || existingPlugin.Version < info.Version || (existingPlugin.Version == info.Version && existingPlugin.BuildDate < info.BuildDate)) {
     197            if (existingPlugin == null || existingPlugin.Version < info.Version) {
    197198              matchingPlugins.Remove(existingPlugin);
    198199              matchingPlugins.Add(info, updateLocation);
     
    206207        var groupedInfos = matchingPlugins.GroupBy(x => x.Value);
    207208        foreach (var group in groupedInfos) {
    208           using (UpdateLocationClient client = new UpdateLocationClient(group.Key)) {
     209          using (var client = new UpdateService.UpdateClient(group.Key)) {
    209210            foreach (var info in group) {
    210               client.GetPluginFiles(info.Key);
     211              client.GetPlugin(info.Key);
    211212            }
    212213          }
  • trunk/sources/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerConsole.cs

    r2612 r2783  
    2727using System.IO;
    2828using System.ComponentModel;
    29 using HeuristicLab.PluginInfrastructure.UpdateLocationReference;
     29using UpdateService = HeuristicLab.PluginInfrastructure.PluginUpdateService;
    3030
    3131namespace HeuristicLab.PluginInfrastructure.Advanced {
     
    4444    void installManager_PreUpdatePlugin(object sender, PluginInfrastructureCancelEventArgs e) {
    4545      Console.WriteLine("Following plugins are updated:");
    46       var infos = (IEnumerable<PluginInformation>)e.Entity;
     46      var infos = (IEnumerable<UpdateService.PluginDescription>)e.Entity;
    4747      foreach (var info in infos) {
    48         Console.WriteLine(info.Name + " " + info.Version + " " + info.BuildDate);
     48        Console.WriteLine(info.Name + " " + info.Version);
    4949      }
    5050      if (GetUserConfirmation()) e.Cancel = false;
     
    5454
    5555    void installManager_PluginUpdated(object sender, PluginInfrastructureEventArgs e) {
    56       foreach (var info in (IEnumerable<PluginInformation>)e.Entity)
     56      foreach (var info in (IEnumerable<UpdateService.PluginDescription>)e.Entity)
    5757        Console.WriteLine("Updated: {0}", info.Name);
    5858    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/HeuristicLab.PluginInfrastructure.csproj

    r2778 r2783  
    155155      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    156156    </None>
    157     <None Include="Service References\UpdateLocationReference\UpdateLocation.xsd" />
    158     <None Include="Service References\UpdateLocationReference\UpdateLocation1.xsd" />
     157    <None Include="Service References\PluginUpdateService\HeuristicLab.Services.Deployment.DataAccess.xsd" />
     158    <None Include="Service References\PluginUpdateService\service.wsdl" />
     159    <None Include="Service References\PluginUpdateService\service.xsd" />
     160    <None Include="Service References\PluginUpdateService\service1.xsd" />
     161    <None Include="Service References\PluginUpdateService\System.xsd" />
    159162    <Compile Include="Properties\Settings.Designer.cs">
    160163      <AutoGen>True</AutoGen>
     
    163166    </Compile>
    164167    <Compile Include="Sandboxing\SandboxManager.cs" />
    165     <Compile Include="Service References\UpdateLocationReference\Reference.cs">
     168    <Compile Include="Service References\PluginUpdateService\Reference.cs">
    166169      <AutoGen>True</AutoGen>
    167170      <DesignTime>True</DesignTime>
     
    193196    <Content Include="Resources\List.gif" />
    194197    <Content Include="Resources\Logo_white.gif" />
    195     <None Include="Service References\UpdateLocationReference\HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation.datasource">
     198    <None Include="Service References\PluginUpdateService\HeuristicLab.PluginInfrastructure.PluginUpdateService.PluginDescription.datasource">
    196199      <DependentUpon>Reference.svcmap</DependentUpon>
    197200    </None>
    198     <None Include="Service References\UpdateLocationReference\Reference.svcmap">
     201    <None Include="Service References\PluginUpdateService\HeuristicLab.PluginInfrastructure.PluginUpdateService.ProductDescription.datasource">
     202      <DependentUpon>Reference.svcmap</DependentUpon>
     203    </None>
     204    <None Include="Service References\PluginUpdateService\Reference.svcmap">
    199205      <Generator>WCF Proxy Generator</Generator>
    200206      <LastGenOutput>Reference.cs</LastGenOutput>
    201207    </None>
    202     <None Include="Service References\UpdateLocationReference\configuration.svcinfo" />
    203     <None Include="Service References\UpdateLocationReference\configuration91.svcinfo" />
    204     <None Include="Service References\UpdateLocationReference\UpdateLocation.disco" />
    205     <None Include="Service References\UpdateLocationReference\UpdateLocation.wsdl" />
    206     <None Include="Service References\UpdateLocationReference\UpdateLocation2.xsd" />
    207     <None Include="Service References\UpdateLocationReference\UpdateLocation3.xsd" />
    208     <None Include="Service References\UpdateLocationReference\UpdateLocation4.xsd" />
     208    <None Include="Service References\PluginUpdateService\configuration.svcinfo" />
     209    <None Include="Service References\PluginUpdateService\configuration91.svcinfo" />
    209210  </ItemGroup>
    210211  <ItemGroup>
     
    212213  </ItemGroup>
    213214  <ItemGroup>
    214     <WCFMetadataStorage Include="Service References\UpdateLocationReference\" />
     215    <WCFMetadataStorage Include="Service References\PluginUpdateService\" />
    215216  </ItemGroup>
    216217  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.PluginInfrastructure/Sandboxing/SandboxManager.cs

    r2612 r2783  
    2727using System.IO;
    2828using System.ComponentModel;
    29 using HeuristicLab.PluginInfrastructure.UpdateLocationReference;
    3029using System.Security;
    3130using System.Security.Permissions;
  • trunk/sources/HeuristicLab.PluginInfrastructure/app.config

    r2597 r2783  
    2727        <bindings>
    2828            <wsHttpBinding>
    29                 <binding name="WSHttpBinding_IUpdateLocation" closeTimeout="00:01:00"
     29                <binding name="WSHttpBinding_IUpdate" closeTimeout="00:01:00"
    3030                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
    3131                    bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
     
    4747        </bindings>
    4848        <client>
    49             <endpoint address="http://localhost:59253/UpdateLocation.svc"
    50                 binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdateLocation"
    51                 contract="UpdateLocationReference.IUpdateLocation" name="WSHttpBinding_IUpdateLocation">
     49            <endpoint address="http://localhost:8731/Design_Time_Addresses/HeuristicLab.Services.Deployment/Update/"
     50                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IUpdate"
     51                contract="PluginUpdateService.IUpdate" name="WSHttpBinding_IUpdate">
    5252                <identity>
    5353                    <dns value="localhost" />
Note: See TracChangeset for help on using the changeset viewer.