Ejemplo n.º 1
0
        private void StartImmortal(int receivePort, int sendPort, string thisInstanceName, string remoteInstanceName)
        {
            ImmortalThreadStartParams threadParams = new ImmortalThreadStartParams(receivePort, sendPort, thisInstanceName, remoteInstanceName);
            Thread thread = new Thread(new ParameterizedThreadStart(RunImmortal));

            thread.IsBackground = true;
            thread.Start(threadParams);
        }
Ejemplo n.º 2
0
        private void RunImmortal(Object obj)
        {
            ImmortalThreadStartParams threadParams = (ImmortalThreadStartParams)obj;

            immortal = new GraphicalImmortal(threadParams._remoteName);
            using (var c = AmbrosiaFactory.Deploy <IGraphicalImmortal>(threadParams._thisName, immortal, threadParams._receivePort, threadParams._sendPort))
            {
                Thread.Sleep(14 * 24 * 3600 * 1000);
            }
        }