- Timestamp:
- 11/23/09 20:32:29 (15 years ago)
- Location:
- branches/PluginInfrastructure Refactoring
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring
- Property svn:ignore
-
old new 1 1 HeuristicLab.suo 2 PluginMetaDataTest
-
- Property svn:ignore
-
branches/PluginInfrastructure Refactoring/HeuristicLab.Update.Service
-
Property
svn:ignore
set to
bin
obj
-
Property
svn:ignore
set to
-
branches/PluginInfrastructure Refactoring/HeuristicLab.Update.Service/HeuristicLab.Update.Service.csproj
r2517 r2528 41 41 </Reference> 42 42 <Reference Include="System.Data" /> 43 <Reference Include="System.Data.Linq"> 44 <RequiredTargetFramework>3.5</RequiredTargetFramework> 45 </Reference> 43 46 <Reference Include="System.Drawing" /> 44 47 <Reference Include="System.EnterpriseServices" /> … … 65 68 </ItemGroup> 66 69 <ItemGroup> 70 <Compile Include="PluginStore.designer.cs"> 71 <AutoGen>True</AutoGen> 72 <DesignTime>True</DesignTime> 73 <DependentUpon>PluginStore.dbml</DependentUpon> 74 </Compile> 67 75 <Compile Include="UpdateLocation.svc.cs"> 68 76 <DependentUpon>UpdateLocation.svc</DependentUpon> … … 76 84 <Name>HeuristicLab.PluginInfrastructure</Name> 77 85 </ProjectReference> 86 </ItemGroup> 87 <ItemGroup> 88 <None Include="PluginStore.dbml"> 89 <Generator>MSLinqToSQLGenerator</Generator> 90 <LastGenOutput>PluginStore.designer.cs</LastGenOutput> 91 <SubType>Designer</SubType> 92 </None> 93 </ItemGroup> 94 <ItemGroup> 95 <Service Include="{3259AA49-8AA1-44D3-9025-A0B520596A8C}" /> 96 </ItemGroup> 97 <ItemGroup> 98 <None Include="PluginStore.dbml.layout"> 99 <DependentUpon>PluginStore.dbml</DependentUpon> 100 </None> 78 101 </ItemGroup> 79 102 <ItemGroup> -
branches/PluginInfrastructure Refactoring/HeuristicLab.Update.Service/HeuristicLab.Update.Service.csproj.user
r2517 r2528 2 2 <ProjectExtensions> 3 3 <VisualStudio> 4 <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}" xmlns="">4 <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> 5 5 <WebProjectProperties> 6 6 <StartPageUrl> -
branches/PluginInfrastructure Refactoring/HeuristicLab.Update.Service/IUpdateLocation.cs
r2517 r2528 12 12 13 13 [OperationContract] 14 IEnumerable<PluginInformation> GetAvailablePlugins ();14 IEnumerable<PluginInformation> GetAvailablePluginsByName(string name); 15 15 16 16 [OperationContract] 17 Stream GetPackedPlugin(PluginInformation info);17 IEnumerable<byte[]> GetPluginFiles(PluginInformation info); 18 18 } 19 19 … … 40 40 } 41 41 42 public PluginInformation(string name, Version version, DateTime buildDate) : base() { 42 public PluginInformation(string name, Version version, DateTime buildDate) 43 : base() { 43 44 this.name = name; 44 45 this.version = version; -
branches/PluginInfrastructure Refactoring/HeuristicLab.Update.Service/UpdateLocation.svc.cs
r2517 r2528 14 14 #region IUpdateLocation Members 15 15 16 public IEnumerable<PluginInformation> GetAvailablePlugins() { 17 yield break; 16 public IEnumerable<PluginInformation> GetAvailablePluginsByName(string name) { 17 using (PluginStoreDataContext ctx = new PluginStoreDataContext()) { 18 return from plugin in ctx.Plugins 19 where MatchingName(name, plugin.Name) 20 select new PluginInformation(plugin.Name, new Version(plugin.Version), plugin.BuildDate); 21 } 18 22 } 23 public IEnumerable<byte[]> GetPluginFiles(PluginInformation info) { 24 using (PluginStoreDataContext ctx = new PluginStoreDataContext()) { 25 return from plugin in ctx.Plugins 26 from file in ctx.PluginFiles 27 where 28 plugin.Name == info.Name && 29 plugin.BuildDate == info.BuildDate && 30 plugin.Version == info.Version.ToString() && 31 file.PluginId == plugin.Id 32 select file.Data.ToArray(); 33 } 34 } 35 #endregion 19 36 20 public System.IO.Stream GetPackedPlugin(PluginInformation info) {21 MemoryStream memStream = new MemoryStream();22 ZipOutputStream stream = new ZipOutputStream(memStream);23 ZipEntryFactory fac = new ZipEntryFactory();24 foreach (string fileName in GetMatchingPluginDescription(info.Name, pluginManager.Plugins).Files) {25 stream.PutNextEntry( (Path.Combine(pluginDir, fileName)));26 }27 37 28 return memStream; 38 private static bool MatchingName(string name, string pluginName) { 39 return name.Equals(pluginName, StringComparison.InvariantCultureIgnoreCase); 29 40 } 30 31 private static PluginDescription GetMatchingPluginDescription(string name, IEnumerable<PluginDescription> plugins) {32 return (from x in plugins33 where x.Name == name34 select x).Single();35 }36 37 #endregion38 41 } 39 42 } -
branches/PluginInfrastructure Refactoring/HeuristicLab.Update.Service/Web.config
r2517 r2528 1 <?xml version="1.0"?>1 <?xml version="1.0"?> 2 2 <!-- 3 3 Note: As an alternative to hand editing this file you can use the … … 27 27 28 28 <appSettings/> 29 <connectionStrings/> 29 <connectionStrings> 30 <add name="HeuristicLab_PluginStoreConnectionString" connectionString="Data Source=HEUREKA01\SQLEXPRESS;Initial Catalog=HeuristicLab.PluginStore;Integrated Security=True" 31 providerName="System.Data.SqlClient" /> 32 </connectionStrings> 30 33 31 34 <system.web>
Note: See TracChangeset
for help on using the changeset viewer.