예제 #1
0
		public static bool IsAddressBookEntryId(byte[] entryId, out Eidt eidt, out string emailAddr)
		{
			eidt = Eidt.User;
			emailAddr = null;
			if (entryId == null)
			{
				return false;
			}
			int num = 0;
			int num2 = entryId.Length;
			bool result = false;
			if (num2 <= AddressBookEntryId.AddressBookEntryIdSize || !AddressBookEntryId.ArrayMatch(entryId, AddressBookEntryId.SkipEntryIdFlagsOffset, AddressBookEntryId.ExchAddrGuid) || entryId[num2 - 1] != 0)
			{
				return result;
			}
			num += AddressBookEntryId.SkipEntryIdFlagsOffset + AddressBookEntryId.ExchAddrGuid.Length + AddressBookEntryId.BinaryHelper.DWordSize;
			try
			{
				eidt = (Eidt)AddressBookEntryId.BinaryHelper.GetDword(entryId, ref num, num2);
				emailAddr = AddressBookEntryId.BinaryHelper.GetStringFromASCII(entryId, ref num, num2);
				result = true;
			}
			catch (ArgumentOutOfRangeException)
			{
			}
			return result;
		}
예제 #2
0
		public static bool IsLocalDirctoryAddressBookEntryId(byte[] entryId)
		{
			return entryId != null && entryId.Length >= AddressBookEntryId.MinLocalDirectoryAddressBookEntryIdSize && entryId.Length <= AddressBookEntryId.MaxLocalDirectoryAddressBookEntryIdSize && AddressBookEntryId.ArrayMatch(entryId, AddressBookEntryId.SkipEntryIdFlagsOffset, AddressBookEntryId.MuidLocalDirectoryUser);
		}