protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     #if DEBUG
     Debug.WriteLine("<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
     #endif
     return base.OnBeforeOutgoing(context);
 }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     if (log.IsDebugEnabled)
     {
         log.DebugFormat(string.Format("Invoking {0} on client hub {1}", context.Invocation.Method, context.Invocation.Hub));
     }
     return base.OnBeforeOutgoing(context);
 }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     if (Log.IsDebugEnabled)
     {
         Log.DebugFormat("<= Invoking {0} on client hub {1}, data: {2}", context.Invocation.Method, context.Invocation.Hub, string.Join(", ", context.Invocation.Args));
     }
     return base.OnBeforeOutgoing(context);
 }
 protected virtual bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     return(true);
 }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     _slabLogger.Log(HubType.HubServerVerbose, "<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
     return base.OnBeforeOutgoing(context);
 }
        protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
        {
            Debug.WriteLine("Loggin OnBeforeOutgoing: {0}", (object)context.Invocation.Method);

            return true;
        }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     ChatLog.InfoFormat("<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
     return base.OnBeforeOutgoing(context);
 }
        /// <summary>
        /// This method is called after the outgoing components of any modules added later to the <see cref="IHubPipeline"/> are
        /// executed. This does not mean that all the clients have received the hub method invocation, but it does indicate indicate
        /// a hub invocation message has successfully been published to a message bus.
        /// </summary>
        /// <param name="context">A description of the client-side hub method invocation.</param>
        protected virtual void OnAfterOutgoing(IHubOutgoingInvokerContext context)
        {

        }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     return base.OnBeforeOutgoing(context);
 }
        internal static Task Outgoing(IHubOutgoingInvokerContext context)
        {
            ConnectionMessage message = context.GetConnectionMessage();

            return(context.Connection.Send(message));
        }
Example #11
0
 /// <summary>
 /// This method is called after the outgoing components of any modules added later to the <see cref="IHubPipeline"/> are
 /// executed. This does not mean that all the clients have received the hub method invocation, but it does indicate indicate
 /// a hub invocation message has successfully been published to a message bus.
 /// </summary>
 /// <param name="context">A description of the client-side hub method invocation.</param>
 protected virtual void OnAfterOutgoing(IHubOutgoingInvokerContext context)
 {
 }
Example #12
0
        public Task Send(IHubOutgoingInvokerContext context)
        {
            EnsurePipeline();

            return _outgoingPipeling.Invoke(context);
        }
Example #13
0
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     //Debug.WriteLine($"<= Invoking {context.Invocation.Method} on client hub {context.Invocation.Hub}");
     return(base.OnBeforeOutgoing(context));
 }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     _slabLogger.Info("LoggingPipelineModule.OnBeforeOutgoing", "<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
     return(base.OnBeforeOutgoing(context));
 }
Example #15
0
        internal static Task Outgoing(IHubOutgoingInvokerContext context)
        {
            var message = new ConnectionMessage(context.Signal, context.Invocation, context.ExcludedSignals);

            return(context.Connection.Send(message));
        }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     Trace.TraceInformation("<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
     return(base.OnBeforeOutgoing(context));
 }
 protected override void OnAfterOutgoing(IHubOutgoingInvokerContext context)
 {
     base.OnAfterOutgoing(context);
 }
Example #18
0
 public Task Send(IHubOutgoingInvokerContext context)
 {
     return(Pipeline.Send(context));
 }
 /// <summary>
 /// This method is called before the outgoing components of any modules added later to the <see cref="IHubPipeline"/> are
 /// executed. If this returns false, then those later-added modules and the client-side hub method invocation(s) will not
 /// be executed.
 /// </summary>
 /// <param name="context">A description of the client-side hub method invocation.</param>
 /// <returns>
 /// true, if the outgoing components of later added modules and the client-side hub method invocation(s) should be executed;
 /// false, otherwise.
 /// </returns>
 protected virtual bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     return true;
 }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     Log.Debug("SignalR Invoking {Method} on client {Hub}", context.Invocation.Method, context.Invocation.Hub);
     return base.OnBeforeOutgoing(context);
 }
 /// <summary>
 /// 将Hub处理完之后的数据加密以进行传输
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     //if (!_canCrypto)
     //{
     //    return base.OnBeforeOutgoing(context);
     //}
     //数据加密
     if (_cryptor == null)
     {
         return false;
     }
     object[] args = context.Invocation.Args;
     string encrypt = _cryptor.EncryptData(JsonConvert.SerializeObject(args));
     context.Invocation.Args = new object[] { encrypt };
     return base.OnBeforeOutgoing(context);
 }
Example #22
0
 /// <summary>
 /// This method is called before the outgoing components of any modules added later to the <see cref="IHubPipeline"/> are
 /// executed. If this returns false, then those later-added modules and the client-side hub method invocation(s) will not
 /// be executed.
 /// </summary>
 /// <param name="context">A description of the client-side hub method invocation.</param>
 /// <returns>
 /// true, if the outgoing components of later added modules and the client-side hub method invocation(s) should be executed;
 /// false, otherwise.
 /// </returns>
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     return(this.onBeforeOutgoing == null
                         ?       base.OnBeforeOutgoing(context)
                         :       this.onBeforeOutgoing(context));
 }
 protected override void OnAfterOutgoing(IHubOutgoingInvokerContext context)
 {
     Debug.WriteLine("Loggin OnAfterOutgoing: {0}", (object)context.Invocation.Method);
 }
Example #24
0
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     Debug.WriteLine("<= Invoking " + context.Invocation.Method + " on client hub " + context.Invocation.Hub);
     return(base.OnBeforeOutgoing(context));
 }
 protected override bool OnBeforeOutgoing(IHubOutgoingInvokerContext context)
 {
     return(base.OnBeforeOutgoing(context));
 }
Example #26
0
 internal static Task Outgoing(IHubOutgoingInvokerContext context)
 {
     return(context.Connection.Send(context.Signal, context.Invocation));
 }