private Command ApplyStrategy(Command command) { var strategy = new HeuristicCloneStrategy(); strategy.SetFormatter(new BinaryFormatter()); strategy.Apply(ref command); return(command); }
private T ApplyStrategy <T>(T result, object producer) { var strategy = new HeuristicCloneStrategy(); strategy.SetFormatter(new BinaryFormatter()); object o = result; strategy.Apply(ref o, producer); return((T)o); }