コード例 #1
0
        private Transaction AddEmp(string line, WordReader wordReader)
        {
            var empId   = wordReader.NextAsInt();
            var name    = wordReader.NextQuoted();
            var address = wordReader.NextQuoted();

            switch (wordReader.Next())
            {
            case "H":
                return(AddHourlyEmployee(empId, name, address, wordReader));

            case "S":
                return(AddSalariedEmployee(empId, name, address, wordReader));

            case "C":
                return(AddCommissionedEmployee(empId, name, address, wordReader));
            }
            throw new InvalidOperationException(string.Format("Cannot parse {0}", line));
        }
コード例 #2
0
 private Transaction ChangeEmployeeName(int empId, WordReader wordReader)
 {
     return(_transactionFactory.MakeChangeNameTransaction(empId, wordReader.NextQuoted()));
 }
コード例 #3
0
 private Transaction ChangeMail(int empId, WordReader wordReader)
 {
     return(_transactionFactory.MakeChangeMailTransaction(empId, wordReader.NextQuoted()));
 }