示例#1
0
        internal static void ApplyEnvironment(this EventBase evt, IDictionary <string, object> env)
        {
            if (env == null)
            {
                throw new ArgumentNullException("env");
            }

            var ctx = new OwinContext(env);

            evt.ActivityId      = ActivityId.GetCurrentId();
            evt.TimeStamp       = DateTime.UtcNow;
            evt.ProcessId       = Process.GetCurrentProcess().Id;
            evt.MachineName     = Environment.MachineName;
            evt.RemoteIpAddress = ctx.Request.RemoteIpAddress;
        }
示例#2
0
 public ErrorViewModel()
 {
     this.RequestId = ActivityId.GetCurrentId();
 }