private VenueService.Participant GetParticipantData(string cname) { VenueService.Participant vp = null; if (this.service != null && !this.venueServiceTimedOut) { try { //Pri2: This should be an async call to the Venue Service vp = service.GetParticipant(cname); // Check for possible problems on the Venue Service if (vp != null && vp.Identifier.ToLower() != cname.ToLower()) { eventLog.WriteEntry( "Venue Service returned a participant with an indentifier not machting " + "the requested identifier. Participant was rejected." + "\n Requested ID: " + cname + "\n Returned ID: " + vp.Identifier, EventLogEntryType.Error, ConferenceEventLog.ID.Error); return(null); } } catch (Exception e) { if (this.mediateTimeouts) { eventLog.WriteEntry("Unable to connect to Venue Service, using a generic Participant: " + e.ToString(), EventLogEntryType.Warning, 60); this.venueServiceTimedOut = true; } else { throw; } } } return(vp); }
private VenueService.Participant GetParticipantData(string cname) { VenueService.Participant vp = null; if (this.service != null && !this.venueServiceTimedOut) { try { //Pri2: This should be an async call to the Venue Service vp = service.GetParticipant(cname); // Check for possible problems on the Venue Service if (vp != null && vp.Identifier.ToLower(CultureInfo.InvariantCulture) != cname.ToLower(CultureInfo.InvariantCulture)) { eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, Strings.IdentifierNotMatchingRequest, cname, vp.Identifier), EventLogEntryType.Error, ConferenceEventLog.ID.Error); return(null); } } catch (Exception e) { if (this.mediateTimeouts) { eventLog.WriteEntry(string.Format(CultureInfo.CurrentCulture, Strings.UnableToConnectUsingGenericParticipant, e.ToString()), EventLogEntryType.Warning, 60); this.venueServiceTimedOut = true; } else { throw; } } } return(vp); }