Exemplo n.º 1
0
        private Command ApplyStrategy(Command command)
        {
            var strategy = new HeuristicCloneStrategy();

            strategy.SetFormatter(new BinaryFormatter());
            strategy.Apply(ref command);
            return(command);
        }
Exemplo n.º 2
0
        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);
        }