コード例 #1
0
            public Task Invoke(CustomFilter2Attribute attribute, VMContext context, NextFilterDelegate next)
            {
                if (context.HubContext.CallType == "Response_VM")
                {
                    var data = JsonConvert.DeserializeObject <IDictionary <string, object> >(context.HubContext.Data.ToString());
                    foreach (var key in data.Keys.ToList())
                    {
                        data[key] = data[key].ToString().ToUpper();
                    }
                    context.HubContext.Data = JsonConvert.SerializeObject(data);
                }

                Invoked?.Invoke(this, Tuple.Create(attribute, context));
                return(next.Invoke(context));
            }
コード例 #2
0
 public Task Invoke(CustomFilter1Attribute attribute, VMContext context, NextFilterDelegate next)
 {
     Invoked?.Invoke(this, Tuple.Create(attribute, context));
     return(next.Invoke(context));
 }
コード例 #3
0
 public virtual Task Invoke(T attribute, VMContext context, NextFilterDelegate next)
 {
     Invoked?.Invoke(this, Tuple.Create(attribute, context));
     return(next.Invoke(context));
 }