public async Task WriteEvent <TParams>(EventType <TParams> eventType, TParams eventParams)
        {
            // Allow null content
            JToken contentObject =
                eventParams != null?
                JToken.FromObject(eventParams, contentSerializer) :
                    null;

            await this.WriteMessage(
                Message.Event(
                    eventType.MethodName,
                    contentObject));
        }
        public async Task WriteEvent <TParams, TRegistrationOptions>(NotificationType <TParams, TRegistrationOptions> eventType, TParams eventParams)
        {
            // Allow null content
            JToken contentObject =
                eventParams != null?
                JToken.FromObject(eventParams, contentSerializer) :
                    null;

            await this.WriteMessage(
                Message.Event(
                    eventType.Method,
                    contentObject));
        }