コード例 #1
0
        protected override void OnStart(string[] args)
        {
            if (args.Length < 2)
            {
                return;
            }
            Login    = args[0];
            Password = args[1];

            var file = new StreamWriter(new FileStream("monitisagent.log",
                                                       System.IO.FileMode.Append));

            try
            {
                file.Write("Starting service");
                var a         = new Authentication(Login, Password, null);
                var mon       = new MonitisClrMethodInfoAnalizer(a);
                var processor = new ClrActionsProcessor();
                _agent = new Agent(mon, processor);
                file.Write("Started service");
            }
            catch (Exception ex)
            {
                file.Write(ex.ToString());

                throw;
            }
            finally
            {
                file.Close();
            }
        }
コード例 #2
0
        protected override void OnStart(string[] args)
        {
            if (args.Length < 2)
                return;
            Login = args[0];
            Password = args[1];

            var file = new StreamWriter(new FileStream("monitisagent.log",
             System.IO.FileMode.Append));
            try
            {
                file.Write("Starting service");
                var a = new Authentication(Login, Password, null);
                var mon = new MonitisClrMethodInfoAnalizer(a);
                var processor = new ClrActionsProcessor();
                _agent = new Agent(mon, processor);
                file.Write("Started service");
            }
            catch (Exception ex)
            {

                file.Write(ex.ToString());

                throw;
            }
            finally
            {
                file.Close();
            }
        }
コード例 #3
0
 public Agent(IInfoAnalizer infoAnalizer, ClrActionsProcessor iLogger)
 {
     _timer = new Timer(ThreadCallback, null, DelayInMs, DelayInMs);
     _actionsProcessor = iLogger;
     _pipeDispatcher = new MnPipeDispatched(_actionsProcessor);
     _infoAnalizer = infoAnalizer;
 }
コード例 #4
0
        private void InitMonitisProfiler()
        {
            var a         = new Authentication(Login, Password, null);
            var mon       = new MonitisClrMethodInfoAnalizer(a);
            var processor = new ClrActionsProcessor();

            processor.MessageRecievedEvent += processor_MessageRecievedEvent;
            _agent = new Agent(mon, processor);
        }
コード例 #5
0
 private void InitMonitisProfiler()
 {
     var a = new Authentication(Login, Password, null);
     var mon = new MonitisClrMethodInfoAnalizer(a);
     var processor = new ClrActionsProcessor();
     processor.MessageRecievedEvent += processor_MessageRecievedEvent;
     _agent = new Agent(mon, processor);
 }