// Token: 0x060027A9 RID: 10153 RVA: 0x000E0D40 File Offset: 0x000DEF40 protected override void OnInit(EventArgs e) { base.OnInit(e); this.contextMenu = new AddressBookContextMenu(base.UserContext, true, false); string text = base.OwaContext.FormsRegistryContext.Type; string action = base.OwaContext.FormsRegistryContext.Action; if (text != null) { object obj = DirectoryView.elementClassParser.Parse(text); if (obj != null && (DirectoryView.ElementClass)obj == DirectoryView.ElementClass.Rooms) { this.type |= DirectoryView.Type.Rooms; this.viewType = ViewType.RoomBrowser; } } if (!string.IsNullOrEmpty(action)) { if (string.Equals(action, "Pick", StringComparison.OrdinalIgnoreCase)) { this.viewType = ((DirectoryView.Type.Rooms == this.type) ? ViewType.RoomPicker : ViewType.DirectoryPicker); this.type |= DirectoryView.Type.Picker; } else if (string.Equals(action, "PickPaa", StringComparison.OrdinalIgnoreCase)) { this.type |= (DirectoryView.Type.Picker | DirectoryView.Type.PaaPicker); this.viewType = ViewType.DirectoryPicker; } else if (string.Equals(action, "PickMobile", StringComparison.OrdinalIgnoreCase)) { this.type |= DirectoryView.Type.Mobile; this.viewType = ViewType.DirectoryPicker; } } if (string.IsNullOrEmpty(base.SerializedContainerId)) { if (this.IsRoomView && this.IsPicker && DirectoryAssistance.IsRoomsAddressListAvailable(base.UserContext)) { this.addressBookBase = base.UserContext.AllRoomsAddressBookInfo.ToAddressBookBase(); return; } this.addressBookBase = base.UserContext.GlobalAddressListInfo.ToAddressBookBase(); return; } else { if (base.UserContext.GlobalAddressListInfo.Origin == GlobalAddressListInfo.GalOrigin.DefaultGlobalAddressList) { this.addressBookBase = DirectoryAssistance.FindAddressBook(base.SerializedContainerId, base.UserContext); return; } if (base.UserContext.GlobalAddressListInfo.Id.Equals(DirectoryAssistance.ParseADObjectId(base.SerializedContainerId))) { this.addressBookBase = base.UserContext.GlobalAddressListInfo.ToAddressBookBase(); return; } throw new OwaInvalidRequestException("Address Book Serialized Id is unsupported " + base.SerializedContainerId); } }
protected void BindToAddressBook() { if (this.addressBookBase == null) { ADObjectId adobjectId = (ADObjectId)this.ListViewState.SourceContainerId; this.addressBookBase = DirectoryAssistance.FindAddressBook(adobjectId.ObjectGuid, base.UserContext); } }
private void GetSearchLocation() { if (string.IsNullOrEmpty(this.searchString) || string.IsNullOrEmpty(this.addressBookToSearch)) { this.addressBookBase = base.UserContext.GlobalAddressListInfo.ToAddressBookBase(); this.addressBookToSearch = "Ad" + ';' + this.addressBookBase.Base64Guid; this.addressBookInfo = new string[] { "Ad", this.addressBookBase.Base64Guid }; return; } bool flag = false; this.addressBookInfo = this.addressBookToSearch.Split(new char[] { ';' }); if (this.addressBookInfo.Length == 2) { if (string.CompareOrdinal(this.addressBookInfo[0], "Ad") == 0) { if (!string.IsNullOrEmpty(this.addressBookInfo[1])) { flag = true; this.addressBookBase = DirectoryAssistance.FindAddressBook(this.addressBookInfo[1], base.UserContext); } } else if (string.CompareOrdinal(this.addressBookInfo[0], "Con") == 0) { flag = true; if (string.CompareOrdinal(this.action, "s") == 0) { this.isNewSearch = false; } this.searchLocation = AddressBook.SearchLocation.Contacts; this.folder = Folder.Bind(base.UserContext.MailboxSession, base.UserContext.ContactsFolderId); } } if (!flag) { throw new OwaInvalidRequestException("Invalid search location for addressbook"); } }