Beispiel #1
0
        public void RegisterListener()
        {
            ConstructorInfo constructor = HandlerType.GetConstructor(Type.EmptyTypes);

            //create instance of handler class
            _handlerClass = constructor.Invoke(new object[] { });

            if (_handlerClass == null)
            {
                throw new Exception("HandlerType class not found");
            }

            var t = Channel.MessageConverter.TypeMapper.GetTypeForKey(TypeKey);

            _handlerMethod = HandlerType.GetMethod(HandlerMethod, new [] { t });
            Log.Info("Listener Type " + TypeKey + " Registered");
        }