public override void StartConnection() { Logger.Info("Attempting to authenticate application"); MyProcessInfo.Status = ProcessInfo.StatusCode.Initializing; ConversationManager.PrimaryCommunicator.Start(); LoginConversation loginConv = new LoginConversation(AuthenticatorEndpoint, MyProcessInfo); loginConv.RegisterDistributedProcessCallbacks(this); loginConv.Start(); }
public override void StartConnection() { Logger.Info("Starting Server"); ConversationManager.PrimaryCommunicator.Start(); LoginConversation loginConv = (LoginConversation)ConversationManager.CreateNewConversation(GetLoginMessage()); loginConv.OnLoginUpdated += new LoginConversation.LoginStatusUpdated(HandleLoginUpdated); loginConv.Start(); // Wait for 5 seconds, or for a value of true int checkCounter = 10; while (MyProcessInfo.Status != ProcessInfo.StatusCode.Registered && checkCounter-- > 0) { Logger.Trace("Attempting to log in"); Thread.Sleep(500); } //return MyProcessInfo.Status == ProcessInfo.StatusCode.Registered; }