/// <inheritdoc/>
        protected override void OnMessageReceived(IncomingMessage msg)
        {
            Google.Protobuf.WellKnownTypes.Any anyMessage = null;
            try
            {
                anyMessage = Google.Protobuf.WellKnownTypes.Any.Parser.ParseFrom(msg.GetRawBytes());
            }
            catch (Google.Protobuf.InvalidProtocolBufferException)
            {
                // Bad message, nothing we can do about it, so just ignore.
                return;
            }

            if (anyMessage.Is(TrainingEnvironmentInitialized.Descriptor))
            {
                var envInitProto = anyMessage.Unpack <TrainingEnvironmentInitialized>();
                var envInitEvent = envInitProto.ToTrainingEnvironmentInitializedEvent();
                TrainingAnalytics.TrainingEnvironmentInitialized(envInitEvent);
            }
            else if (anyMessage.Is(TrainingBehaviorInitialized.Descriptor))
            {
                var behaviorInitProto     = anyMessage.Unpack <TrainingBehaviorInitialized>();
                var behaviorTrainingEvent = behaviorInitProto.ToTrainingBehaviorInitializedEvent();
                TrainingAnalytics.TrainingBehaviorInitialized(behaviorTrainingEvent);
            }
            // Don't do anything for unknown types, since the user probably can't do anything about it.
        }
 /// <inheritdoc/>
 protected override void OnMessageReceived(IncomingMessage msg)
 {
     m_MessagesReceived.Add(msg.GetRawBytes());
 }