NML

NML Learning Channel 2 - Functions, Delegates, Lambdas, Events, Anonymous Types and Tuples

Build a simple console application with the following

Session

https://learningchannel.blob.core.windows.net/002-functions-delegates-event-tuples/LearningChannel.Delegates.zip

https://learningchannel.blob.core.windows.net/002-functions-delegates-event-tuples/Functions_Delegate_Events@11_30am.mp4 (Sound not the best)

https://learningchannel.blob.core.windows.net/002-functions-delegates-event-tuples/Functions_Delegate_Events@5pm.mp4

Challenge

Code challenge: Build a simple console application with the following:

  • a class that looks for the word ‘gobbledygook’ in a line of text (entered in the command line?) and then emit an event and also write “Found nonsense!” to the command line
  • a class that is invoked when ‘gobbledygook’ is found and encodes the entered string in Base64 and writes the result to the command line
  • a class that is invoked when ‘gobbledygook’ is found and replaces the word ‘gobbledygook’ with the word ‘balderdash’ and writes the result to the command line
  • a class that is invoked when ‘gobbledygook’ is found and randomizes the word in the entered string and writes the result to the command line
  • only Program.cs should directly interact with System.Console

The purpose of the challenge is to exercise the concepts we covered in the last learning channel session, so your solution should incorporate that (events, delegates, functions, etc).

  • You should spend no more than and hour on this (outside of work hours or at least work in any time spent on this)
  • Extra consideration/mention if you find a way to use value tuples (that is sensible!)
  • Extra consideration/mention if you use best practice OOP (without - YAGNI is king
  • Extra consideration/mention if your code is immaculate and resharper compliant (NOT stylecop)
  • Entries to be submitted by Monday 11am latest
  • Group/team entries accepted
  • There will be a winner this time and some kind of stupid prize, like a Vida coffee or drink of your choice.

Review and Entries

https://learningchannel.blob.core.windows.net/002-challenge-delegates/LearningChannel.Challenge2.mp4

https://learningchannel.blob.core.windows.net/002-challenge-delegates/002.Challenge.Delegates.zip