Beispiel #1
0
        public static ReplyData ReplyInformation(TypeOfFeedback input)
        {
            ReplyData answer;
            string    replyText = "Your feedback has been forwarded " +
                                  "to the product manager.";

            switch (input)
            {
            case TypeOfFeedback.Complaint:
            case TypeOfFeedback.Praise:
                answer = new ReplyData(
                    Actions.ForwardToManagement,
                    "Thank you. " + replyText,
                    true);
                break;

            case TypeOfFeedback.Suggestion:
                answer = new ReplyData(
                    Actions.ForwardToDeveloper,
                    replyText,
                    true);
                break;

            case TypeOfFeedback.Incomprehensible:
            default:
                answer = new ReplyData();
                break;
            }
            return(answer);
        }
Beispiel #2
0
        static void UseTheSimplifiedClass()
        {
            ReplyData[] answer = new ReplyData[5];
            int         i      = 0;

            foreach (TypeOfFeedback t in Enum.GetValues(typeof(TypeOfFeedback)))
            {
                // The call to the library.
                answer[i] = RedesignedRefAndOut.ReplyInformation(t);
                Console.WriteLine(answer[i++]);
            }
        }