public class Colour
    {
        public Colour(string name)
        {
            Name = name;
        }

        public string Name { get; set; }

        public override string ToString()
        {
            return Name;
        }
    }

    public class DoubleSpace : BasicOperation<Colour>
    {
        public override Colour Execute(Colour input)
        {
                string name = string.Empty;
                char[] chars = member.Name.ToCharArray();
                foreach (var c in chars)
                {
                    name = name + c + " ";
                }

                member.Name = name.Trim();

            SetSuccessResult(true);

            return input;
        }

Last edited Mar 6, 2011 at 8:06 PM by djnz_gea, version 2

Comments

No comments yet.