Ejemplo n.º 1
0
 public void Handle(ITracingContext tracingContext, Object Provider)
 {
     if (Provider is Dictionary <string, object> ProviderData)
     {
         var MethodName = ProviderData["MethodName"].ToString();
         ProviderData.Remove("MethodName");
         var Parameters = ProviderData.ToJson();
         var Partial    = tracingContext.CreateLocalPartialContext(MethodName);
         Partial.Context.Component = "MethodInvoke";
         Partial.Context.LayerType = ChannelLayerType.Method;
         Partial.Context.Add("Method", MethodName);
         Partial.Context.Add("Parameters", Parameters);
     }
 }
        private PartialContext CreateContext(DbCommand Command, string operationName)
        {
            PartialContext Context;

            foreach (var provider in EFCoreDiagnosticHandler)
            {
                if (provider.Match(Command.Connection))
                {
                    Context = TracingContext.CreateExitPartialContext(operationName);
                    Context.Context.Component = "EntityFrameWorkCore.Complate";
                    return(Context);
                }
            }
            Context = TracingContext.CreateLocalPartialContext(operationName);
            Context.Context.Component = "EntityFrameWorkCore";
            return(Context);
        }