Free cookie consent management tool by TermsFeed Policy Generator

Changeset 12944


Ignore:
Timestamp:
09/07/15 11:42:17 (9 years ago)
Author:
jkarder
Message:

#2205: added code resources

Location:
branches/OptimizationNetworks/HeuristicLab.Networks/3.3
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/HeuristicLab.Networks-3.3.csproj

    r12326 r12944  
    205205  <ItemGroup>
    206206    <Compile Include="AlgorithmNode.cs" />
     207    <Compile Include="CodeResources.Designer.cs">
     208      <AutoGen>True</AutoGen>
     209      <DesignTime>True</DesignTime>
     210      <DependentUpon>CodeResources.resx</DependentUpon>
     211    </Compile>
    207212    <Compile Include="ConfigurationPort.cs" />
    208213    <Compile Include="ExecutionPort.cs" />
     
    214219    <Compile Include="IExecutionPort.cs" />
    215220    <Compile Include="IUserDefinedMessagePort.cs" />
    216     <EmbeddedResource Include="KSPTSPConnectorCode.cs" />
     221    <EmbeddedResource Include="CodeResources.resx">
     222      <Generator>ResXFileCodeGenerator</Generator>
     223      <LastGenOutput>CodeResources.Designer.cs</LastGenOutput>
     224    </EmbeddedResource>
     225    <Compile Include="KSPTSPConnectorCode.cs" />
    217226    <Compile Include="KSPTSPConcurrentControlNetwork.cs" />
    218227    <Compile Include="KSPTSPConnector.cs">
     
    220229    </Compile>
    221230    <Compile Include="KSPTSPControl.cs" />
    222     <EmbeddedResource Include="KSPTSPControlCode.cs" />
     231    <Compile Include="KSPTSPControlCode.cs" />
    223232    <Compile Include="KSPTSPNetwork.cs" />
    224     <EmbeddedResource Include="KSPTSPNetworkCode.cs" />
    225     <EmbeddedResource Include="KSPTSPConcurrentControlNetworkCode.cs" />
     233    <Compile Include="KSPTSPNetworkCode.cs" />
     234    <Compile Include="KSPTSPConcurrentControlNetworkCode.cs" />
    226235    <Compile Include="Core\IConnectablePort.cs" />
    227236    <Compile Include="Core\IMessage.cs" />
     
    258267    <Compile Include="Programmable\IUserDefinedNode.cs" />
    259268    <Compile Include="Programmable\ProgrammableNetwork.cs" />
    260     <EmbeddedResource Include="Programmable\ProgrammableNetworkCode.cs" />
     269    <Compile Include="Programmable\ProgrammableNetworkCode.cs" />
    261270    <Compile Include="Programmable\ProgrammableNetworkItem.cs" />
    262     <EmbeddedResource Include="Programmable\ProgrammableNetworkItemCode.cs" />
     271    <Compile Include="Programmable\ProgrammableNetworkItemCode.cs" />
    263272    <Compile Include="Programmable\ProgrammableNode.cs" />
    264     <EmbeddedResource Include="Programmable\ProgrammableNodeCode.cs" />
     273    <Compile Include="Programmable\ProgrammableNodeCode.cs" />
    265274    <Compile Include="Programmable\UserDefinedNetwork.cs" />
    266275    <Compile Include="Programmable\UserDefinedNode.cs" />
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/KSPTSPConcurrentControlNetwork.cs

    r11823 r12944  
    3636
    3737    protected override string CodeTemplate {
    38       get { return ReadCodeTemplate("HeuristicLab.Networks.KSPTSPConcurrentControlNetworkCode.cs"); }
     38      get { return CodeResources.KSPTSPConcurrentControlNetworkCode; }
    3939    }
    4040
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/KSPTSPConnector.cs

    r11712 r12944  
    3030  public class KSPTSPConnector : ProgrammableNode {
    3131    protected override string CodeTemplate {
    32       get { return ReadCodeTemplate("HeuristicLab.Networks.KSPTSPConnectorCode.cs"); }
     32      get { return CodeResources.KSPTSPConnectorCode; }
    3333    }
    3434
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/KSPTSPControl.cs

    r11823 r12944  
    5858
    5959    protected override string CodeTemplate {
    60       get { return ReadCodeTemplate("HeuristicLab.Networks.KSPTSPControlCode.cs"); }
     60      get { return CodeResources.KSPTSPControlCode; }
    6161    }
    6262
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/KSPTSPNetwork.cs

    r11713 r12944  
    3131  public class KSPTSPNetwork : ProgrammableNetwork {
    3232    protected override string CodeTemplate {
    33       get { return ReadCodeTemplate("HeuristicLab.Networks.KSPTSPNetworkCode.cs"); }
     33      get { return CodeResources.KSPTSPNetworkCode; }
    3434    }
    3535
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Programmable/ProgrammableNetwork.cs

    r12943 r12944  
    5656
    5757    protected override string CodeTemplate {
    58       get { return ReadCodeTemplate("HeuristicLab.Networks.Programmable.ProgrammableNetworkCode.cs"); }
     58      get { return CodeResources.ProgrammableNetworkCode; }
    5959    }
    6060
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Programmable/ProgrammableNetworkItem.cs

    r11712 r12944  
    101101
    102102    protected virtual string CodeTemplate {
    103       get { return ReadCodeTemplate("HeuristicLab.Networks.Programmable.ProgrammableNetworkItemCode.cs"); }
     103      get { return CodeResources.ProgrammableNetworkItemCode; }
    104104    }
    105105    [Storable]
     
    397397    }
    398398    #endregion
    399 
    400     #region Helpers
    401     protected virtual string ReadCodeTemplate(string templateName) {
    402       using (var stream = Assembly.GetAssembly(this.GetType()).GetManifestResourceStream(templateName))
    403       using (var reader = new StreamReader(stream)) {
    404         return reader.ReadToEnd();
    405       }
    406     }
    407     #endregion
    408399  }
    409400}
  • branches/OptimizationNetworks/HeuristicLab.Networks/3.3/Programmable/ProgrammableNode.cs

    r11712 r12944  
    6161
    6262    protected override string CodeTemplate {
    63       get { return ReadCodeTemplate("HeuristicLab.Networks.Programmable.ProgrammableNodeCode.cs"); }
     63      get { return CodeResources.ProgrammableNodeCode; }
    6464    }
    6565
Note: See TracChangeset for help on using the changeset viewer.