Exemplo n.º 1
0
        public void Handle(InvocationMessage msg)
        {
            Console.WriteLine("resolving " + msg.Context.RecipientKey);
            var target = m_kernel.Resolve(msg.Context.RecipientKey, msg.Method.DeclaringType);

            replaceTokensWithCallbackProxies(msg, msg.Context.SenderPath);
            msg.Method.Invoke(target, msg.Arguments);
        }
Exemplo n.º 2
0
        public void Handle(InvocationMessage msg)
        {
            Console.WriteLine("resolving " + msg.Context.RecipientKey);
            var target = m_kernel.Resolve(msg.Context.RecipientKey, msg.Method.DeclaringType);

            replaceTokensWithCallbackProxies(msg, msg.Context.SenderPath);
            msg.Method.Invoke(target, msg.Arguments);
        }
Exemplo n.º 3
0
        public void Intercept(IInvocation invocation)
        {
            assertIsValid(invocation.Method);
            // TODO: fix dependency on IoC
            var address = m_address ?? m_target.Configuration.Attributes[WindsorEx.ADDRESS];
            var key = m_target.Configuration.Attributes[WindsorEx.REMOTE_KEY];
            Console.WriteLine("invoking {0} on {1}", invocation, address);
            var ctx = new Context {RecipientKey = key, RecipientPath = address};
            var invocationPayload = new InvocationMessage(ctx, invocation);
            replaceCallbacksWithTokens(invocationPayload);
            var payload = m_serializer.Serialize(invocationPayload);
            var transportMessage = new TransportMessage(payload, address);

            m_transport.OnNext(transportMessage);
        }
        public void Intercept(IInvocation invocation)
        {
            assertIsValid(invocation.Method);
            // TODO: fix dependency on IoC
            var address = m_address ?? m_target.Configuration.Attributes[WindsorEx.ADDRESS];
            var key     = m_target.Configuration.Attributes[WindsorEx.REMOTE_KEY];

            Console.WriteLine("invoking {0} on {1}", invocation, address);
            var ctx = new Context {
                RecipientKey = key, RecipientPath = address
            };
            var invocationPayload = new InvocationMessage(ctx, invocation);

            replaceCallbacksWithTokens(invocationPayload);
            var payload          = m_serializer.Serialize(invocationPayload);
            var transportMessage = new TransportMessage(payload, address);

            m_transport.OnNext(transportMessage);
        }