public Result Unjoin(string username) { Result unjoinResult; //Remove the user from the list of joined users, held by DarPoolingService. IAsyncResult asyncResult = removeJoinedUser.BeginInvoke(username, null, null); // Wait until the thread complete its execution. while (!asyncResult.IsCompleted) { } unjoinResult = new UnjoinConfirmedResult(); unjoinResult.Comment = "You are logged OFF from Darpooling"; return(unjoinResult); }
private bool IsFinalInteraction(Result result) { LoginErrorResult error = result as LoginErrorResult; if (error != null) { return(true); } UnjoinConfirmedResult unjoin = result as UnjoinConfirmedResult; if (unjoin != null) { return(true); } return(false); }
public Result Unjoin(string username) { Result unjoinResult; //Remove the user from the list of joined users, held by DarPoolingService. IAsyncResult asyncResult = removeJoinedUser.BeginInvoke(username, null, null); // Wait until the thread complete its execution. while (!asyncResult.IsCompleted) { } unjoinResult = new UnjoinConfirmedResult(); unjoinResult.Comment = "You are logged OFF from Darpooling"; return unjoinResult; }