Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/10/14 01:42:42 (10 years ago)
Author:
swagner
Message:

#2205: Implemented review comments

  • adapted formatting of multi-line LINQ queries
  • renamed Entity to NetworkItem
Location:
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3
Files:
11 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/ClassDiagram.cd

    r11527 r11528  
    11<?xml version="1.0" encoding="utf-8"?>
    22<ClassDiagram MajorVersion="1" MinorVersion="1">
    3   <Class Name="HeuristicLab.Core.Networks.Entity" Collapsed="true">
    4     <Position X="7.75" Y="0.5" Width="1.5" />
    5     <TypeIdentifier>
    6       <HashCode>AAAiAACAAAAAQAJAAAAEQQAAAAAAQAAAAAAAAAAEAEQ=</HashCode>
    7       <FileName>Core.Networks\Entity.cs</FileName>
    8     </TypeIdentifier>
    9     <Lollipop Position="0.2" />
    10   </Class>
    113  <Class Name="HeuristicLab.Core.Networks.GenericNode" Collapsed="true">
    124    <Position X="1" Y="3.5" Width="1.5" />
     
    6355    <Lollipop Position="0.2" />
    6456  </Class>
     57  <Class Name="HeuristicLab.Core.Networks.NetworkItem" Collapsed="true">
     58    <Position X="7.75" Y="0.5" Width="1.5" />
     59    <TypeIdentifier>
     60      <HashCode>AAAiAACAAAAAQAJAAAAEQQAAAAAAQAAAAAAAAAAEAEQ=</HashCode>
     61      <FileName>Core.Networks\NetworkItem.cs</FileName>
     62    </TypeIdentifier>
     63    <Lollipop Position="0.2" />
     64  </Class>
    6565  <Class Name="HeuristicLab.Core.Networks.Node" Collapsed="true">
    6666    <Position X="4.5" Y="2" Width="1.5" />
     
    170170  </Class>
    171171  <Interface Name="HeuristicLab.Core.Networks.IConnectedPort" Collapsed="true">
    172     <Position X="10" Y="11.75" Width="1.5" />
     172    <Position X="7.75" Y="11.75" Width="1.5" />
    173173    <TypeIdentifier>
    174174      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAACAAAAAAAAAAAAAAAAA=</HashCode>
     
    176176    </TypeIdentifier>
    177177  </Interface>
    178   <Interface Name="HeuristicLab.Core.Networks.IEntity" Collapsed="true">
    179     <Position X="7.75" Y="7.5" Width="1.5" />
    180     <TypeIdentifier>
    181       <HashCode>AAAAAAAAAAAAAAIAAAAEQAAAAAAAAAAAAAAAAAAAAAQ=</HashCode>
    182       <FileName>Core.Networks\IEntity.cs</FileName>
    183     </TypeIdentifier>
    184   </Interface>
    185178  <Interface Name="HeuristicLab.Core.Networks.IGenericNode" Collapsed="true">
    186     <Position X="5.5" Y="10.5" Width="1.5" />
     179    <Position X="3.25" Y="10.5" Width="1.5" />
    187180    <TypeIdentifier>
    188181      <HashCode>AAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
     
    191184  </Interface>
    192185  <Interface Name="HeuristicLab.Core.Networks.IGenericPort" Collapsed="true">
    193     <Position X="13.5" Y="11.75" Width="1.5" />
     186    <Position X="11.25" Y="11.75" Width="1.5" />
    194187    <TypeIdentifier>
    195188      <HashCode>ARAAMAAAQAAAACABACAAAAAAAgQAAAAAAAAACQAAAAQ=</HashCode>
     
    219212  </Interface>
    220213  <Interface Name="HeuristicLab.Core.Networks.INetwork" Collapsed="true">
    221     <Position X="3.25" Y="10.5" Width="1.5" />
     214    <Position X="1" Y="10.5" Width="1.5" />
    222215    <TypeIdentifier>
    223216      <HashCode>AAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
     
    225218    </TypeIdentifier>
    226219  </Interface>
     220  <Interface Name="HeuristicLab.Core.Networks.INetworkItem" Collapsed="true">
     221    <Position X="7.75" Y="7.5" Width="1.5" />
     222    <TypeIdentifier>
     223      <HashCode>AAAAAAAAAAAAAAIAAAAEQAAAAAAAAAAAAAAAAAAAAAQ=</HashCode>
     224      <FileName>Core.Networks\INetworkItem.cs</FileName>
     225    </TypeIdentifier>
     226  </Interface>
    227227  <Interface Name="HeuristicLab.Core.Networks.INode" Collapsed="true">
    228     <Position X="5.5" Y="9" Width="1.5" />
     228    <Position X="3.25" Y="9" Width="1.5" />
    229229    <TypeIdentifier>
    230230      <HashCode>AAAAAAAAAAAAAAAABAAAQAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
     
    233233  </Interface>
    234234  <Interface Name="HeuristicLab.Core.Networks.IParameterizedPort" Collapsed="true">
    235     <Position X="12.25" Y="10.5" Width="1.5" />
     235    <Position X="10" Y="10.5" Width="1.5" />
    236236    <TypeIdentifier>
    237237      <HashCode>AAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAA=</HashCode>
     
    240240  </Interface>
    241241  <Interface Name="HeuristicLab.Core.Networks.IPort" Collapsed="true">
    242     <Position X="12.25" Y="9" Width="1.5" />
     242    <Position X="10" Y="9" Width="1.5" />
    243243    <TypeIdentifier>
    244244      <HashCode>AAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
     
    247247  </Interface>
    248248  <Interface Name="HeuristicLab.Core.Networks.IPortParameter" Collapsed="true">
    249     <Position X="1" Y="9" Width="1.5" />
     249    <Position X="14.5" Y="9" Width="1.5" />
    250250    <TypeIdentifier>
    251251      <HashCode>AAAAAAAAAAIAQAAAAAAAQAAAAADAAAAAEQAAAAAAAAA=</HashCode>
     
    254254  </Interface>
    255255  <Interface Name="HeuristicLab.Core.Networks.IPortParameter&lt;T&gt;" Collapsed="true">
    256     <Position X="1" Y="10.5" Width="1.5" />
     256    <Position X="14.5" Y="10.5" Width="1.5" />
    257257    <TypeIdentifier>
    258258      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAAAAAAAA=</HashCode>
     
    268268  </Interface>
    269269  <Interface Name="HeuristicLab.Optimization.Networks.IAlgorithmNode" Collapsed="true">
    270     <Position X="7.75" Y="10.5" Width="1.5" />
     270    <Position X="5.5" Y="10.5" Width="1.5" />
    271271    <TypeIdentifier>
    272272      <HashCode>AAAAAAAAAAAAEAAABAAAQAAAAAAAAAAAAAAAAAQAAAA=</HashCode>
     
    275275  </Interface>
    276276  <Interface Name="HeuristicLab.Optimization.Networks.IConfigurationPort" Collapsed="true">
    277     <Position X="12.25" Y="13.25" Width="1.5" />
     277    <Position X="10" Y="13.25" Width="1.5" />
    278278    <TypeIdentifier>
    279279      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
     
    282282  </Interface>
    283283  <Interface Name="HeuristicLab.Optimization.Networks.IExecutionPort" Collapsed="true">
    284     <Position X="14.5" Y="13.25" Width="1.5" />
     284    <Position X="12.25" Y="13.25" Width="1.5" />
    285285    <TypeIdentifier>
    286286      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/GenericPort.cs

    r11526 r11528  
    161161      // collect output parameters from local port
    162162      message.Values.AddRange(
    163         Parameters.
    164         Where(p => p.Type.HasFlag(PortParameterType.Output)).
    165         Select(p => p.CreateMessageValue())
     163        Parameters
     164          .Where(p => p.Type.HasFlag(PortParameterType.Output))
     165          .Select(p => p.CreateMessageValue())
    166166      );
    167167
     
    169169      if (ConnectedPort != null) {
    170170        message.Values.AddRange(
    171           ConnectedPort.Parameters.
    172           Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name)).
    173           Select(p => p.CreateMessageValue())
     171          ConnectedPort.Parameters
     172            .Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name))
     173            .Select(p => p.CreateMessageValue())
    174174        );
    175175      }
     
    178178      if (ConnectedPort != null) {
    179179        message.Values.AddRange(
    180           ConnectedPort.Parameters.
    181           Where(p => p.Type.HasFlag(PortParameterType.Output) && !message.Values.ContainsKey(p.Name)).
    182           Select(p => p.CreateMessageValue())
     180          ConnectedPort.Parameters
     181            .Where(p => p.Type.HasFlag(PortParameterType.Output) && !message.Values.ContainsKey(p.Name))
     182            .Select(p => p.CreateMessageValue())
    183183        );
    184184      }
     
    186186      // collect remaining input parameters from local port
    187187      message.Values.AddRange(
    188         Parameters.
    189         Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name)).
    190         Select(p => p.CreateMessageValue())
     188        Parameters
     189          .Where(p => p.Type.HasFlag(PortParameterType.Input) && !message.Values.ContainsKey(p.Name))
     190          .Select(p => p.CreateMessageValue())
    191191      );
    192192
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/INetworkItem.cs

    r11527 r11528  
    2424
    2525namespace HeuristicLab.Core.Networks {
    26   public interface IEntity : INamedItem {
    27     IEntity Parent { get; }
    28     IEnumerable<IEntity> Children { get; }
     26  public interface INetworkItem : INamedItem {
     27    INetworkItem Parent { get; }
     28    IEnumerable<INetworkItem> Children { get; }
    2929    string Path { get; }
    3030    event EventHandler PathChanged;
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/INode.cs

    r11526 r11528  
    2121
    2222namespace HeuristicLab.Core.Networks {
    23   public interface INode : IEntity {
     23  public interface INode : INetworkItem {
    2424    new INetwork Parent { get; set; }
    2525    IKeyedItemCollection<string, IPort> Ports { get; }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IPort.cs

    r11526 r11528  
    2121
    2222namespace HeuristicLab.Core.Networks {
    23   public interface IPort : IEntity {
     23  public interface IPort : INetworkItem {
    2424    new INode Parent { get; set; }
    2525  }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IPortParameter.cs

    r11526 r11528  
    2323
    2424namespace HeuristicLab.Core.Networks {
    25   public interface IPortParameter : IEntity {
     25  public interface IPortParameter : INetworkItem {
    2626    new IPort Parent { get; set; }
    2727    Type DataType { get; }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/Network.cs

    r11526 r11528  
    3737    }
    3838
    39     public override IEnumerable<IEntity> Children {
    40       get { return base.Children.Concat(Nodes.AsEnumerable<IEntity>()); }
     39    public override IEnumerable<INetworkItem> Children {
     40      get { return base.Children.Concat(Nodes.AsEnumerable<INetworkItem>()); }
    4141    }
    4242
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/NetworkItem.cs

    r11527 r11528  
    2828
    2929namespace HeuristicLab.Core.Networks {
    30   [Item("Entity", "Abstract base class for entities of an optimization network.")]
     30  [Item("NetworkItem", "Abstract base class for items of a network.")]
    3131  [StorableClass]
    32   public abstract class Entity : NamedItem, IEntity {
     32  public abstract class NetworkItem : NamedItem, INetworkItem {
    3333    public static readonly string PathSeparator = " => ";
    3434    public static new Image StaticItemImage {
     
    3636    }
    3737
    38     private IEntity parent;
    39     public IEntity Parent {
     38    private INetworkItem parent;
     39    public INetworkItem Parent {
    4040      get { return parent; }
    4141      protected set {
     
    4848      }
    4949    }
    50     public virtual IEnumerable<IEntity> Children {
    51       get { return Enumerable.Empty<IEntity>(); }
     50    public virtual IEnumerable<INetworkItem> Children {
     51      get { return Enumerable.Empty<INetworkItem>(); }
    5252    }
    5353    public string Path {
     
    5858
    5959    [StorableConstructor]
    60     protected Entity(bool deserializing) : base(deserializing) { }
    61     protected Entity(Entity original, Cloner cloner) : base(original, cloner) { }
    62     protected Entity() : base("Entity") { }
    63     protected Entity(string name) : base(name) { }
    64     protected Entity(string name, string description) : base(name, description) { }
     60    protected NetworkItem(bool deserializing) : base(deserializing) { }
     61    protected NetworkItem(NetworkItem original, Cloner cloner) : base(original, cloner) { }
     62    protected NetworkItem() : base("NetworkItem") { }
     63    protected NetworkItem(string name) : base(name) { }
     64    protected NetworkItem(string name, string description) : base(name, description) { }
    6565
    6666    protected override void OnNameChanging(CancelEventArgs<string> e) {
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/Node.cs

    r11526 r11528  
    2929  [Item("Node", "A node of an optimization network.")]
    3030  [StorableClass]
    31   public class Node : Entity, INode {
     31  public class Node : NetworkItem, INode {
    3232    public static new Image StaticItemImage {
    3333      get { return HeuristicLab.Common.Resources.VSImageLibrary.RadialChart; }
     
    4141      }
    4242    }
    43     public override IEnumerable<IEntity> Children {
    44       get { return base.Children.Concat(Ports.AsEnumerable<IEntity>()); }
     43    public override IEnumerable<INetworkItem> Children {
     44      get { return base.Children.Concat(Ports.AsEnumerable<INetworkItem>()); }
    4545    }
    4646
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/ParameterizedPort.cs

    r11526 r11528  
    3030  [StorableClass]
    3131  public abstract class ParameterizedPort : Port, IParameterizedPort {
    32     public override IEnumerable<IEntity> Children {
    33       get { return base.Children.Concat(Parameters.AsEnumerable<IEntity>()); }
     32    public override IEnumerable<INetworkItem> Children {
     33      get { return base.Children.Concat(Parameters.AsEnumerable<INetworkItem>()); }
    3434    }
    3535
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/Port.cs

    r11526 r11528  
    2727  [Item("Port", "Abstract base class for ports of an optimization network node.")]
    2828  [StorableClass]
    29   public abstract class Port : Entity, IPort {
     29  public abstract class Port : NetworkItem, IPort {
    3030    public static new Image StaticItemImage {
    3131      get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/PortParameter.cs

    r11526 r11528  
    2828  [Item("PortParameter", "A parameter of a port.")]
    2929  [StorableClass]
    30   public class PortParameter<T> : Entity, IPortParameter<T> where T : class, IItem {
     30  public class PortParameter<T> : NetworkItem, IPortParameter<T> where T : class, IItem {
    3131    public static new Image StaticItemImage {
    3232      get { return HeuristicLab.Common.Resources.VSImageLibrary.Field; }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/HeuristicLab.Optimization.Networks-3.3.csproj

    r11526 r11528  
    9090  </ItemGroup>
    9191  <ItemGroup>
    92     <Compile Include="Core.Networks\Entity.cs" />
    9392    <Compile Include="Core.Networks\GenericNode.cs" />
    9493    <Compile Include="Core.Networks\GenericPort.cs" />
    9594    <Compile Include="Core.Networks\IConnectedPort.cs" />
    96     <Compile Include="Core.Networks\IEntity.cs" />
    9795    <Compile Include="Core.Networks\IGenericNode.cs" />
    9896    <Compile Include="Core.Networks\IGenericPort.cs" />
     
    10098    <Compile Include="Core.Networks\IMessageValue.cs" />
    10199    <Compile Include="Core.Networks\INetwork.cs" />
     100    <Compile Include="Core.Networks\INetworkItem.cs" />
    102101    <Compile Include="Core.Networks\INode.cs" />
    103102    <Compile Include="Core.Networks\IParameterizedPort.cs" />
     
    109108    <Compile Include="Core.Networks\MessageValueCollection.cs" />
    110109    <Compile Include="Core.Networks\Network.cs" />
     110    <Compile Include="Core.Networks\NetworkItem.cs" />
    111111    <Compile Include="Core.Networks\Node.cs" />
    112112    <Compile Include="Core.Networks\NodeCollection.cs" />
Note: See TracChangeset for help on using the changeset viewer.