Exemplo n.º 1
0
        public void Start()
        {
            NTrace.Info("Starting");
            this.channel = ServerUtilities.GetTcpChannel();
            NTrace.Debug("Acquired Tcp Channel");

            try
            {
                this.agency = (TestAgency)Activator.GetObject(typeof(TestAgency), agencyUrl);
                NTrace.DebugFormat("Connected to TestAgency at {0}", agencyUrl);
            }
            catch (Exception ex)
            {
                NTrace.ErrorFormat("Unable to connect to test agency at {0}", agencyUrl);
                NTrace.Error(ex.Message);
            }

            try
            {
                this.agency.Register(this, ProcessId);
                NTrace.Debug("Registered with TestAgency");
            }
            catch (Exception ex)
            {
                NTrace.Error("Failed to register with TestAgency", ex);
            }
        }