Exemplo n.º 1
0
        protected override void StartMonitoring(NativeActivityContext context)
        {
            Dictionary <string, string> aArguments = new Dictionary <string, string>();

            aArguments["Retries"] = Retries.Get(context).ToString();

            _aContextClient = new ContextClientNamedPipe(ContextName.Get(context), aArguments, this.Debug, false);
            _aContextClient.CreateClient();
            _aContextClient.EventHandler += HandleEvent;
        }
Exemplo n.º 2
0
 protected override void StopMonitoring(ActivityContext context)
 {
     try
     {
         if (_aContextClient != null)
         {
             _aContextClient.MyDispose();
             _aContextClient = null;
         }
     }
     catch (Exception ex)
     {
         System.Diagnostics.Trace.TraceError(ex.Message);
     }
 }