Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using HeuristicLab.Core;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Operators.MPISupport.BinaryTransport {
|
---|
8 | [Serializable]
|
---|
9 | class VariableTransfer {
|
---|
10 | public string Name { get; set; }
|
---|
11 | public string Description { get; set; }
|
---|
12 | public object Value { get; set; }
|
---|
13 |
|
---|
14 | public static VariableTransfer Convert(IVariable item) {
|
---|
15 | VariableTransfer result = new VariableTransfer();
|
---|
16 |
|
---|
17 | result.Name = item.Name;
|
---|
18 | result.Description = item.Description;
|
---|
19 | result.Value = ItemTransfer.Convert(item.Value);
|
---|
20 |
|
---|
21 | return result;
|
---|
22 | }
|
---|
23 |
|
---|
24 | public static IVariable Convert(VariableTransfer item, IExecutionContext globalScope) {
|
---|
25 | IVariable result = new Variable();
|
---|
26 |
|
---|
27 | result.Name = item.Name;
|
---|
28 | result.Description = item.Description;
|
---|
29 | result.Value = ItemTransfer.Convert(item.Value, globalScope);
|
---|
30 |
|
---|
31 | return result;
|
---|
32 | }
|
---|
33 | }
|
---|
34 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.