Esempio n. 1
0
        public virtual void RegisterHandler <TMessage>(ITelemetryHelper telemetryHelper, RouteManager routeManger, Action <TMessage> handler, Type targetedType, bool holdMessageLock = true)
            where TMessage : IMessage
        {
            Action <TMessage> registerableHandler = BusHelper.BuildTelemeteredActionHandler <TMessage, TAuthenticationToken>(telemetryHelper, handler, holdMessageLock, "Azure/Bus");

            routeManger.RegisterHandler(registerableHandler, targetedType);

            telemetryHelper.TrackEvent(string.Format("Cqrs/RegisterHandler/{0}", typeof(TMessage).FullName), new Dictionary <string, string> {
                { "Type", "Azure/Bus" }
            });
            telemetryHelper.Flush();
        }