Changeset 11787
- Timestamp:
- 01/16/15 11:23:17 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.Scripting/3.3
- Files:
-
- 5 added
- 2 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting/3.3/HeuristicLab.Scripting-3.3.csproj
r11721 r11787 91 91 </ItemGroup> 92 92 <ItemGroup> 93 <Compile Include="CSharpScript.cs" /> 94 <EmbeddedResource Include="CSharpScriptCode.cs" /> 93 <Compile Include="Scripts\CSharp\CSharpScript.cs" /> 94 <Compile Include="Scripts\Templates\CSharpScriptTemplate.cs" /> 95 <Compile Include="Scripts\Templates\ScriptTemplates.Designer.cs"> 96 <AutoGen>True</AutoGen> 97 <DesignTime>True</DesignTime> 98 <DependentUpon>ScriptTemplates.resx</DependentUpon> 99 </Compile> 95 100 <Compile Include="Variables.cs" /> 96 101 <Compile Include="VariableStore.cs" /> 97 102 <None Include="Plugin.cs.frame" /> 98 103 <Compile Include="Script.cs" /> 99 <Compile Include=" CSharpScriptBase.cs" />104 <Compile Include="Scripts\CSharp\CSharpScriptBase.cs" /> 100 105 <Compile Include="Plugin.cs" /> 101 106 <Compile Include="Properties\AssemblyInfo.cs" /> … … 137 142 </ProjectReference> 138 143 </ItemGroup> 144 <ItemGroup> 145 <EmbeddedResource Include="Scripts\Templates\ScriptTemplates.resx"> 146 <Generator>ResXFileCodeGenerator</Generator> 147 <LastGenOutput>ScriptTemplates.Designer.cs</LastGenOutput> 148 </EmbeddedResource> 149 </ItemGroup> 139 150 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 140 151 <PropertyGroup> -
trunk/sources/HeuristicLab.Scripting/3.3/Script.cs
r11721 r11787 157 157 if (handler != null) handler(this, EventArgs.Empty); 158 158 } 159 160 #region Helpers161 protected virtual string ReadCodeTemplate(string templateName) {162 using (var stream = Assembly.GetAssembly(this.GetType()).GetManifestResourceStream(templateName))163 using (var reader = new StreamReader(stream)) {164 return reader.ReadToEnd();165 }166 }167 #endregion168 159 } 169 160 } -
trunk/sources/HeuristicLab.Scripting/3.3/Scripts/CSharp/CSharpScript.cs
r11747 r11787 35 35 #region Constants 36 36 protected const string ExecuteMethodName = "Execute"; 37 protected override string CodeTemplate { get { return ReadCodeTemplate("HeuristicLab.Scripting.CSharpScriptCode.cs"); } }37 protected override string CodeTemplate { get { return ScriptTemplates.CSharpScriptTemplate; } } 38 38 #endregion 39 39 -
trunk/sources/HeuristicLab.Scripting/3.3/Scripts/Templates/CSharpScriptTemplate.cs
r11747 r11787 9 9 using System.Linq; 10 10 using System.Collections.Generic; 11 12 using HeuristicLab.Core; 11 13 using HeuristicLab.Common; 12 using HeuristicLab.Core;13 using HeuristicLab.Data;14 //using HeuristicLab.Collections; 15 //using HeuristicLab.Data; 14 16 15 17 public class MyScript : HeuristicLab.Scripting.CSharpScriptBase {
Note: See TracChangeset
for help on using the changeset viewer.