- Timestamp:
- 02/18/15 10:54:32 (10 years ago)
- Location:
- branches/HeuristicLab.DatasetRefactor/sources
- Files:
-
- 2 deleted
- 8 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.DatasetRefactor/sources
- Property svn:mergeinfo changed
-
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/HeuristicLab.Scripting-3.3.csproj
r11078 r12031 10 10 <RootNamespace>HeuristicLab.Scripting</RootNamespace> 11 11 <AssemblyName>HeuristicLab.Scripting-3.3</AssemblyName> 12 <TargetFrameworkVersion>v4. 0</TargetFrameworkVersion>12 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 13 13 <FileAlignment>512</FileAlignment> 14 14 <TargetFrameworkProfile /> … … 23 23 <WarningLevel>4</WarningLevel> 24 24 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 25 <Prefer32Bit>false</Prefer32Bit> 25 26 </PropertyGroup> 26 27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> … … 31 32 <ErrorReport>prompt</ErrorReport> 32 33 <WarningLevel>4</WarningLevel> 34 <Prefer32Bit>false</Prefer32Bit> 33 35 </PropertyGroup> 34 36 <PropertyGroup> … … 46 48 <ErrorReport>prompt</ErrorReport> 47 49 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 50 <Prefer32Bit>false</Prefer32Bit> 48 51 </PropertyGroup> 49 52 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> … … 55 58 <ErrorReport>prompt</ErrorReport> 56 59 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 60 <Prefer32Bit>false</Prefer32Bit> 57 61 </PropertyGroup> 58 62 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> … … 64 68 <ErrorReport>prompt</ErrorReport> 65 69 <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> 70 <Prefer32Bit>false</Prefer32Bit> 66 71 </PropertyGroup> 67 72 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> … … 73 78 <ErrorReport>prompt</ErrorReport> 74 79 <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> 80 <Prefer32Bit>false</Prefer32Bit> 75 81 </PropertyGroup> 76 82 <ItemGroup> … … 85 91 </ItemGroup> 86 92 <ItemGroup> 87 <Compile Include="CSharpScript.cs" /> 93 <Compile Include="CompilationException.cs" /> 94 <Compile Include="Scripts\CSharp\CSharpScript.cs" /> 95 <Compile Include="Scripts\Templates\CSharpScriptTemplate.cs" /> 96 <Compile Include="Scripts\Templates\ScriptTemplates.Designer.cs"> 97 <AutoGen>True</AutoGen> 98 <DesignTime>True</DesignTime> 99 <DependentUpon>ScriptTemplates.resx</DependentUpon> 100 </Compile> 88 101 <Compile Include="Variables.cs" /> 89 102 <Compile Include="VariableStore.cs" /> 90 103 <None Include="Plugin.cs.frame" /> 91 104 <Compile Include="Script.cs" /> 92 <Compile Include=" CSharpScriptBase.cs" />105 <Compile Include="Scripts\CSharp\CSharpScriptBase.cs" /> 93 106 <Compile Include="Plugin.cs" /> 94 107 <Compile Include="Properties\AssemblyInfo.cs" /> … … 130 143 </ProjectReference> 131 144 </ItemGroup> 145 <ItemGroup> 146 <EmbeddedResource Include="Scripts\Templates\ScriptTemplates.resx"> 147 <Generator>ResXFileCodeGenerator</Generator> 148 <LastGenOutput>ScriptTemplates.Designer.cs</LastGenOutput> 149 <CustomToolNamespace>HeuristicLab.Scripting</CustomToolNamespace> 150 </EmbeddedResource> 151 </ItemGroup> 132 152 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 133 153 <PropertyGroup> 134 154 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 135 155 set ProjectDir=$(ProjectDir) -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/Plugin.cs.frame
r11174 r12031 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Scripting { 25 [Plugin("HeuristicLab.Scripting", "3.3.1 0.$WCREV$")]25 [Plugin("HeuristicLab.Scripting", "3.3.11.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Scripting-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/Properties/AssemblyInfo.cs.frame
r11174 r12031 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 4HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2015 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3.1 0.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.11.$WCREV$")] -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/Script.cs
r11477 r12031 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using System.CodeDom.Compiler; 25 25 using System.Collections.Generic; 26 using System.Diagnostics;27 26 using System.Drawing; 28 27 using System.IO; … … 80 79 public Script() 81 80 : base("Script", "An empty script.") { 82 code = string.Empty;81 code = CodeTemplate; 83 82 } 84 83 public Script(string code) … … 109 108 WarningLevel = 4 110 109 }; 110 111 111 parameters.ReferencedAssemblies.AddRange( 112 112 GetAssemblies() 113 113 .Select(a => a.Location) 114 114 .ToArray()); 115 var unit = CreateCompilationUnit(); 116 var writer = new StringWriter(); 117 CodeProvider.GenerateCodeFromCompileUnit( 118 unit, 119 writer, 120 new CodeGeneratorOptions { 121 ElseOnClosing = true, 122 IndentString = " ", 123 }); 124 return CodeProvider.CompileAssemblyFromDom(parameters, unit); 115 116 return CodeProvider.CompileAssemblyFromSource(parameters, code); 125 117 } 126 118 … … 135 127 .AppendLine(error.ErrorText); 136 128 } 137 throw new Exception(string.Format("Compilation of \"{0}\" failed:{1}{2}",129 throw new CompilationException(string.Format("Compilation of \"{0}\" failed:{1}{2}", 138 130 Name, Environment.NewLine, sb.ToString())); 139 131 } else { … … 143 135 144 136 public virtual IEnumerable<Assembly> GetAssemblies() { 145 var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic && File.Exists(a.Location)).ToList(); 137 var assemblies = AppDomain.CurrentDomain.GetAssemblies().Where(a => !a.IsDynamic && File.Exists(a.Location)).ToList(); 146 138 assemblies.Add(typeof(Microsoft.CSharp.RuntimeBinder.Binder).Assembly); // for dlr functionality 147 139 return assemblies; -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/UserScriptBase.cs
r10566 r12031 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/VariableStore.cs
r11066 r12031 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 4Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Drawing; 23 24 using System.IO; 24 25 using HeuristicLab.Collections; 25 26 using HeuristicLab.Common; 27 using HeuristicLab.Common.Resources; 26 28 using HeuristicLab.Core; 27 29 using HeuristicLab.Persistence.Core; … … 32 34 [Item("VariableStore", "Represents a variable store.")] 33 35 [StorableClass] 34 public class VariableStore : ObservableDictionary<string, object>, IContent, IDeepCloneable { 36 public class VariableStore : ObservableDictionary<string, object>, IItem { 37 #region Properties 38 public virtual string ItemName { 39 get { return ItemAttribute.GetName(GetType()); } 40 } 41 public virtual string ItemDescription { 42 get { return ItemAttribute.GetDescription(GetType()); } 43 } 44 public Version ItemVersion { 45 get { return ItemAttribute.GetVersion(GetType()); } 46 } 47 public static Image StaticItemImage { 48 get { return VSImageLibrary.Class; } 49 } 50 public virtual Image ItemImage { 51 get { return ItemAttribute.GetImage(GetType()); } 52 } 53 #endregion 54 55 #region Constructors & Cloning 35 56 [StorableConstructor] 36 57 protected VariableStore(bool deserializing) : base(deserializing) { } … … 68 89 } 69 90 } 91 #endregion 92 93 #region Overrides 94 public override string ToString() { 95 return ItemName; 96 } 97 #endregion 98 99 #region Events 100 public event EventHandler ItemImageChanged; 101 protected virtual void OnItemImageChanged() { 102 var handler = ItemImageChanged; 103 if (handler != null) handler(this, EventArgs.Empty); 104 } 105 public event EventHandler ToStringChanged; 106 protected virtual void OnToStringChanged() { 107 var handler = ToStringChanged; 108 if (handler != null) handler(this, EventArgs.Empty); 109 } 110 #endregion 70 111 } 71 112 } -
branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Scripting/3.3/Variables.cs
r11135 r12031 6 6 public class Variables : DynamicObject, IEnumerable<KeyValuePair<string, object>> { 7 7 private readonly VariableStore variableStore; 8 9 public IEnumerable<string> Keys { 10 get { return variableStore.Keys; } 11 } 12 13 public IEnumerable<object> Values { 14 get { return variableStore.Values; } 15 } 8 16 9 17 public Variables(VariableStore variableStore) {
Note: See TracChangeset
for help on using the changeset viewer.