protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { object value = propertyBag.GetValue(InternalSchema.ConversationIndex); byte[] array = value as byte[]; if (array == null) { PropertyError propertyError = (PropertyError)value; if (propertyError.PropertyErrorCode == PropertyErrorCode.NotEnoughMemory) { return(new PropertyError(this, PropertyErrorCode.CorruptedData)); } return(new PropertyError(this, propertyError.PropertyErrorCode)); } else { if (array.Length < 22) { return(new PropertyError(this, PropertyErrorCode.CorruptedData)); } byte[] array2 = new byte[16]; Array.Copy(array, 6, array2, 0, 16); object result; try { result = PersonId.Create(array2); } catch (CorruptDataException) { result = new PropertyError(this, PropertyErrorCode.CorruptedData); } return(result); } }
protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag) { object value = propertyBag.GetValue(InternalSchema.LinkRejectHistoryRaw); byte[][] array = value as byte[][]; if (array != null) { try { PersonId[] array2 = new PersonId[array.Length]; for (int i = 0; i < array.Length; i++) { array2[i] = PersonId.Create(array[i]); } return(array2); } catch (ArgumentException) { } return(new PropertyError(this, PropertyErrorCode.CorruptedData)); } if (value is PropertyError) { return(value); } return(new PropertyError(this, PropertyErrorCode.CorruptedData)); }
internal override QueryFilter NativeFilterToSmartFilter(QueryFilter filter) { ComparisonFilter comparisonFilter = filter as ComparisonFilter; if (comparisonFilter == null || !comparisonFilter.Property.Equals(InternalSchema.MapiConversationId)) { throw base.CreateInvalidFilterConversionException(filter); } return(new ComparisonFilter(comparisonFilter.ComparisonOperator, this, PersonId.Create((byte[])comparisonFilter.PropertyValue))); }