Free cookie consent management tool by TermsFeed Policy Generator

source: branches/OptimizationNetworks/HeuristicLab.Optimization.Networks/3.3/Core.Networks/IGenericPort.cs @ 11529

Last change on this file since 11529 was 11529, checked in by swagner, 9 years ago

#2205: Implemented review comments

  • made Node and Network abstract
  • renamed GenericNode to UserDefinedNode and sealed it
  • added sealed UserDefinedNetwork
  • made Nodes in Network not changeable by default
  • made Parameters in ParameterizedPort not changeable by default
  • removed value None in PortParameterType
  • refactored call algorithm.PrepareMessage() in AlgorithmNode
File size: 1.8 KB
RevLine 
[11489]1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using HeuristicLab.Common;
23using System;
24using System.Threading;
25using System.Threading.Tasks;
26
[11526]27namespace HeuristicLab.Core.Networks {
[11489]28  public interface IGenericPort : IParameterizedPort {
[11529]29    new PortParameterCollection Parameters { get; }
30
[11490]31    IConnectedPort ConnectedPort { get; set; }
[11489]32    bool PortConnectionValid { get; }
[11519]33    bool LogMessages { get; set; }
[11501]34    MessageCollection Messages { get; }
[11489]35
36    event EventHandler ConnectedPortChanged;
[11519]37    event EventHandler PortConnectionValidChanged;
38    event EventHandler LogMessagesChanged;
[11489]39
40    bool CanConnectToPort(IPort port);
41    void CloneConnectedPortParameters();
42
43    IMessage PrepareMessage();
44    void SendMessage(IMessage message);
45    void SendMessage(IMessage message, CancellationToken token);
46    Task SendMessageAsync(IMessage message);
47    Task SendMessageAsync(IMessage message, CancellationToken token);
48
49    event EventHandler<EventArgs<IMessage, CancellationToken>> MessageReceived;
50  }
51}
Note: See TracBrowser for help on using the repository browser.