Ejemplo n.º 1
0
 public void Init(Trace.TraceContext context)
 {
     this.context     = context;
     this.emailConfig = context.Trace.EmailConfig;
     if (emailConfig.Enabled)
     {
         from = new MailAddress(emailConfig.EmailAddress);
     }
 }
Ejemplo n.º 2
0
 public TraceConnection(TraceContext context)
 {
     this.context  = context;
     this.instance = context.Trace.Instance;
     connection    = new SqlConnection(instance.ConnectionString);
     traceid       = -1;
     Open();
     DecodeFunctions = new Dictionary <SqlDbType, Action <TraceEvent, int> >();
     DecodeFunctions.Add(SqlDbType.Int, SetIntColumn);
     DecodeFunctions.Add(SqlDbType.BigInt, SetLongColumn);
     DecodeFunctions.Add(SqlDbType.DateTime, SetDateTimeColumn);
     DecodeFunctions.Add(SqlDbType.NVarChar, SetStringColumn);
     DecodeFunctions.Add(SqlDbType.Image, SetByteColumn);
     DecodeFunctions.Add(SqlDbType.Text, SetStringColumn);
     DecodeFunctions.Add(SqlDbType.UniqueIdentifier, SetGuidColumn);
 }
Ejemplo n.º 3
0
 public ITraceObserver Create(Trace.TraceContext context)
 {
     return(func(context));
 }
Ejemplo n.º 4
0
 internal TraceEvent(TraceContext context)
 {
     this.context  = context;
     this.Instance = context.Trace.Instance;
     Values        = new Dictionary <int, object>();
 }