Last change
on this file since 583 was
583,
checked in by abeham, 16 years ago
|
Adding communication framework to branch 3.1 (ticket #278)
|
File size:
931 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 | using HeuristicLab.Core;
|
---|
5 | using HeuristicLab.Data;
|
---|
6 | using HeuristicLab.Communication.Data;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Communication.Operators {
|
---|
9 | public class DataStreamFinisher : OperatorBase {
|
---|
10 | public override string Description {
|
---|
11 | get {
|
---|
12 | return @"TODO";
|
---|
13 | }
|
---|
14 | }
|
---|
15 |
|
---|
16 | public DataStreamFinisher() {
|
---|
17 | AddVariableInfo(new VariableInfo("DataStream", "", typeof(IDataStream), VariableKind.Deleted));
|
---|
18 | }
|
---|
19 |
|
---|
20 | public override IOperation Apply(IScope scope) {
|
---|
21 | IDataStream datastream = GetVariableValue<IDataStream>("DataStream", scope, true);
|
---|
22 |
|
---|
23 | datastream.Close();
|
---|
24 |
|
---|
25 | IVariableInfo info = GetVariableInfo("DataStream");
|
---|
26 | if (info.Local)
|
---|
27 | RemoveVariable(info.ActualName);
|
---|
28 | else
|
---|
29 | scope.RemoveVariable(scope.TranslateName(info.FormalName));
|
---|
30 |
|
---|
31 | return null;
|
---|
32 | }
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.