main
 1namespace mars.rover.presentation.model
 2{
 3    public class CommandLineArgument
 4    {
 5        readonly string argument;
 6
 7        CommandLineArgument(string argument)
 8        {
 9            this.argument = argument;
10        }
11
12        static public implicit operator CommandLineArgument(string argument)
13        {
14            return new CommandLineArgument(argument);
15        }
16
17        public override string ToString()
18        {
19            return argument;
20        }
21
22        public bool Equals(CommandLineArgument other)
23        {
24            if (ReferenceEquals(null, other)) return false;
25            if (ReferenceEquals(this, other)) return true;
26            return Equals(other.argument, argument);
27        }
28
29        public override bool Equals(object obj)
30        {
31            if (ReferenceEquals(null, obj)) return false;
32            if (ReferenceEquals(this, obj)) return true;
33            if (obj.GetType() != typeof (CommandLineArgument)) return false;
34            return Equals((CommandLineArgument) obj);
35        }
36
37        public override int GetHashCode()
38        {
39            return (argument != null ? argument.GetHashCode() : 0);
40        }
41    }
42}