using System; using System.Collections.Generic; using System.Linq; using System.Text; using HeuristicLab.Core; namespace HeuristicLab.Operators.MPISupport.BinaryTransport { [Serializable] class VariableTransfer { public string Name { get; set; } public string Description { get; set; } public object Value { get; set; } public static VariableTransfer Convert(IVariable item) { VariableTransfer result = new VariableTransfer(); result.Name = item.Name; result.Description = item.Description; result.Value = ItemTransfer.Convert(item.Value); return result; } public static IVariable Convert(VariableTransfer item, IExecutionContext globalScope) { IVariable result = new Variable(); result.Name = item.Name; result.Description = item.Description; result.Value = ItemTransfer.Convert(item.Value, globalScope); return result; } } }