CSharp: Adding messageHandling