C# implementation with extension methods and JavaScript implementation with hand-coded mixins'