Exemple #1
0
        // Token: 0x060019C1 RID: 6593 RVA: 0x0005B6AC File Offset: 0x000598AC
        protected override OnlineMeetingType ProcessOnlineMeetingResult(UserContext userContext, OnlineMeetingResult result)
        {
            OnlineMeetingType result2;

            using (this.CalendarItem)
            {
                if (this.CalendarItem == null)
                {
                    result2 = OnlineMeetingType.CreateFailedOnlineMeetingType("Unable to find existing item corresponding to id: " + this.itemId.Id);
                }
                else
                {
                    this.CalendarItem.OpenAsReadWrite();
                    this.CalendarItem.OnlineMeetingConfLink     = result.OnlineMeeting.MeetingUri;
                    this.CalendarItem.OnlineMeetingExternalLink = result.OnlineMeeting.WebUrl;
                    this.CalendarItem.OnlineMeetingInternalLink = string.Empty;
                    this.CalendarItem.UCOpenedConferenceID      = Guid.NewGuid().ToString("B");
                    this.CalendarItem.ConferenceTelURI          = OutlookAddinAdapter.GetConferenceTelUri(result);
                    Capabilities ucCapabilities = OutlookAddinAdapter.GetUcCapabilities(result, userContext.UserCulture);
                    try
                    {
                        this.CalendarItem.UCCapabilities = OutlookAddinAdapter.Serialize(ucCapabilities);
                    }
                    catch (InvalidOperationException ex)
                    {
                        base.LogAndTraceError("An error occured while serializing UCCapabilities: " + UcwaConfigurationUtilities.BuildFailureLogString(ex));
                        return(OnlineMeetingType.CreateFailedOnlineMeetingType("An error occured while serializing UCCapabilities"));
                    }
                    try
                    {
                        this.CalendarItem.UCInband = OutlookAddinAdapter.Serialize(OutlookAddinAdapter.GetUCInband(result));
                    }
                    catch (InvalidOperationException ex2)
                    {
                        base.LogAndTraceError("An error occured while serializing UCInband: " + UcwaConfigurationUtilities.BuildFailureLogString(ex2));
                        return(OnlineMeetingType.CreateFailedOnlineMeetingType("An error occured while serializing UCInband"));
                    }
                    try
                    {
                        this.CalendarItem.UCMeetingSetting = OutlookAddinAdapter.Serialize(OutlookAddinAdapter.GetUCMeetingSetting(result));
                    }
                    catch (InvalidOperationException ex3)
                    {
                        base.LogAndTraceError("An error occured while serializing UCMeetingSetting: " + UcwaConfigurationUtilities.BuildFailureLogString(ex3));
                        return(OnlineMeetingType.CreateFailedOnlineMeetingType("An error occured while serializing UCMeetingSetting"));
                    }
                    try
                    {
                        PropertyDefinitionStream updatedOutlookUserPropsPropDefStream = OutlookAddinAdapter.GetUpdatedOutlookUserPropsPropDefStream(this.CalendarItem.OutlookUserPropsPropDefStream);
                        this.CalendarItem.OutlookUserPropsPropDefStream = updatedOutlookUserPropsPropDefStream.GetByteArray();
                    }
                    catch (EndOfStreamException ex4)
                    {
                        base.LogAndTraceError("[ProcessOnlineMeetingResult] A read error occurred when parsing OutlookUserPropsPropDefStream: " + UcwaConfigurationUtilities.BuildFailureLogString(ex4));
                        return(OnlineMeetingType.CreateFailedOnlineMeetingType("A read error occured when parsing OutlookUserPropsPropDefStream"));
                    }
                    OnlineMeetingType          onlineMeetingType = CreateOnlineMeeting.CreateOnlineMeetingTypeFromOnlineMeetingResult(result, ucCapabilities, base.CallContext.ProtocolLog);
                    ConcatenatedIdAndChangeKey concatenatedId    = IdConverter.GetConcatenatedId(this.CalendarItem.Id, new MailboxId(this.MailboxSession), null);
                    onlineMeetingType.ItemId = new ItemId(concatenatedId.Id, concatenatedId.ChangeKey);
                    this.CalendarItem.Save(SaveMode.NoConflictResolutionForceSave);
                    result2 = onlineMeetingType;
                }
            }
            return(result2);
        }
Exemple #2
0
        // Token: 0x060019C9 RID: 6601 RVA: 0x0005BE64 File Offset: 0x0005A064
        private static OnlineMeetingType CreateOnlineMeetingTypeFromOnlineMeetingResult(OnlineMeetingResult onlineMeetingResult, Capabilities capabilities, RequestDetailsLogger logger)
        {
            List <Exception>  list = new List <Exception>();
            OnlineMeetingType onlineMeetingType = new OnlineMeetingType();

            onlineMeetingType.HelpUrl              = onlineMeetingResult.CustomizationValues.InvitationHelpUrl;
            onlineMeetingType.LegalUrl             = onlineMeetingResult.CustomizationValues.InvitationLegalUrl;
            onlineMeetingType.CustomFooterText     = onlineMeetingResult.CustomizationValues.InvitationFooterText;
            onlineMeetingType.ExternalDirectoryUri = onlineMeetingResult.DialIn.ExternalDirectoryUri;
            onlineMeetingType.InternalDirectoryUri = onlineMeetingResult.DialIn.InternalDirectoryUri;
            onlineMeetingType.LogoUrl              = onlineMeetingResult.CustomizationValues.InvitationLogoUrl;
            onlineMeetingType.WebUrl = onlineMeetingResult.OnlineMeeting.WebUrl;
            try
            {
                onlineMeetingType.AccessLevel = CreateOnlineMeeting.ConvertAccessLevel(onlineMeetingResult.OnlineMeeting.Accesslevel);
            }
            catch (ArgumentException item)
            {
                list.Add(item);
            }
            try
            {
                onlineMeetingType.LobbyBypass = CreateOnlineMeeting.ConvertLobbyBypass(onlineMeetingResult.OnlineMeeting.PstnUserLobbyBypass);
            }
            catch (ArgumentException item2)
            {
                list.Add(item2);
            }
            try
            {
                onlineMeetingType.Presenters = CreateOnlineMeeting.ConvertPresenters(onlineMeetingResult.OnlineMeeting.AutomaticLeaderAssignment);
            }
            catch (ArgumentException item3)
            {
                list.Add(item3);
            }
            if (capabilities == null)
            {
                return(onlineMeetingType);
            }
            if (onlineMeetingResult.DialIn.IsAudioConferenceProviderEnabled)
            {
                onlineMeetingType.AcpInformation = new AcpInformationType();
                onlineMeetingType.AcpInformation.ParticipantPassCode = onlineMeetingResult.DialIn.ParticipantPassCode;
                onlineMeetingType.AcpInformation.TollNumber          = onlineMeetingResult.DialIn.TollNumber;
                onlineMeetingType.AcpInformation.TollFreeNumbers     = onlineMeetingResult.DialIn.TollFreeNumbers;
            }
            else
            {
                onlineMeetingType.ConferenceId = onlineMeetingResult.OnlineMeeting.PstnMeetingId;
                List <DialInNumberType> list2 = new List <DialInNumberType>();
                foreach (Region region in capabilities.Regions)
                {
                    foreach (AccessNumber accessNumber in region.AccessNumbers)
                    {
                        DialInNumberType dialInNumberType = new DialInNumberType();
                        dialInNumberType.RegionName = region.Name;
                        dialInNumberType.Number     = accessNumber.Number;
                        try
                        {
                            dialInNumberType.Language = new CultureInfo(accessNumber.LanguageID).NativeName;
                        }
                        catch (CultureNotFoundException ex)
                        {
                            ExTraceGlobals.OnlineMeetingTracer.TraceError <int, string>(0, 0L, "CreateOnlineMeeting::CreateOnlineMeetingTypeFromOnlineMeetingResult. CultureNotFoundException occurred when creating CultureInfo from LanguageId '{0}'. Exception:'{1}'.  ", accessNumber.LanguageID, UcwaConfigurationUtilities.BuildFailureLogString(ex));
                            list.Add(new OwaException(string.Format("Unable to create cultureInfo corresponding to lcid '{0}' for region '{1}' with number '{2}'", accessNumber.LanguageID, region.Name, accessNumber.Number), ex));
                        }
                        list2.Add(dialInNumberType);
                    }
                }
                onlineMeetingType.Numbers = list2.ToArray();
            }
            if (list.Count > 0)
            {
                StringBuilder stringBuilder = new StringBuilder();
                foreach (Exception ex2 in list)
                {
                    stringBuilder.AppendFormat("{0}::", UcwaConfigurationUtilities.BuildFailureLogString(ex2));
                }
                logger.Set(CreateOnlineMeetingMetadata.Exceptions, stringBuilder.ToString());
            }
            return(onlineMeetingType);
        }