示例#1
0
        static void Auth()
        {
            client = new WcfService.MessageServiceClient();
            Console.Write("Enter user name: ");
            string userName = Console.ReadLine();

            commandsParser = new CommandParser(client, userName);
        }
示例#2
0
 public CommandParser(WcfService.MessageServiceClient client, string userName)
 {
     this.client   = client;
     this.userName = userName;
     this.client.Connect(userName);
     commands[Commands.Push]    = Push;
     commands[Commands.Dump]    = Dump;
     commands[Commands.Restore] = Restore;
     commands[Commands.Exit]    = () => { };
 }