private void InternalSetValidatedStoreProperty(PropertyDefinition propertyDefinition, object value) { this.EnsureInternalDataStructuresAllocated(8); Array array = value as Array; if (array != null) { value = MemoryPropertyBag.ClonePropertyValue <Array>(array); } else if (value is DateTime) { ExTimeZoneHelperForMigrationOnly.CheckValidationLevel(false, ExTimeZoneHelperForMigrationOnly.ValidationLevel.Low, "MemoryPropertyBag.InternalSetValidatedStoreProperty: System.DateTime", new object[0]); value = new ExDateTime(this.ExTimeZone, (DateTime)value); } else if (value is ExDateTime) { ((ExDateTime)value).CheckExpectedTimeZone(this.ExTimeZone, ExTimeZoneHelperForMigrationOnly.ValidationLevel.High); value = this.ExTimeZone.ConvertDateTime((ExDateTime)value); } object originalValue = null; StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(propertyDefinition); bool flag = (storePropertyDefinition.PropertyFlags & PropertyFlags.TrackChange) == PropertyFlags.TrackChange; if (!(value is PropertyError) && flag && this.propertyValues.ContainsKey(propertyDefinition)) { originalValue = this.propertyValues[propertyDefinition]; } this.propertyValues[propertyDefinition] = value; if (this.deletedProperties != null) { this.deletedProperties.Remove(propertyDefinition); } this.ChangedProperties.TryAdd(propertyDefinition); this.AddTrackingInformation(storePropertyDefinition, PropertyTrackingInformation.Modified, originalValue); }
public static void PerformActionOnNativePropertyDefinitions <T>(PropertyDependencyType targetDependencyType, ICollection <T> propertyDefinitions, Action <NativeStorePropertyDefinition> action) where T : PropertyDefinition { EnumValidator.AssertValid <PropertyDependencyType>(targetDependencyType); if (propertyDefinitions == null) { return; } int actualDependencyCount = 0; foreach (T t in propertyDefinitions) { PropertyDefinition propertyDefinition = t; StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(propertyDefinition); storePropertyDefinition.ForEachMatch(targetDependencyType, delegate(NativeStorePropertyDefinition item) { action(item); actualDependencyCount++; }); } int num = (propertyDefinitions.Count >= StorePropertyDefinition.dependencyEstimates.Length) ? propertyDefinitions.Count : StorePropertyDefinition.dependencyEstimates[propertyDefinitions.Count]; if (actualDependencyCount != num && propertyDefinitions.Count < StorePropertyDefinition.dependencyEstimates.Length) { Interlocked.Exchange(ref StorePropertyDefinition.dependencyEstimates[propertyDefinitions.Count], actualDependencyCount); } }
public override Stream OpenPropertyStream(PropertyDefinition propertyDefinition, PropertyOpenMode openMode) { Stream stream = null; StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(propertyDefinition); if (openMode != PropertyOpenMode.Create) { object value = ((IDirectPropertyBag)this.memoryPropertyBag).GetValue(storePropertyDefinition); PropertyError propertyError = value as PropertyError; if (propertyError == null) { stream = this.WrapValueInStream(value); } else if (propertyError.PropertyErrorCode == PropertyErrorCode.RequireStreamed) { stream = this.streamList[storePropertyDefinition]; } else if (openMode == PropertyOpenMode.ReadOnly) { throw new ObjectNotFoundException(ServerStrings.StreamPropertyNotFound(storePropertyDefinition.ToString())); } } if (stream == null) { stream = new MemoryStream(); ((IDirectPropertyBag)this.memoryPropertyBag).SetValue(storePropertyDefinition, new PropertyError(storePropertyDefinition, PropertyErrorCode.RequireStreamed)); this.streamList[storePropertyDefinition] = stream; } if (openMode != PropertyOpenMode.ReadOnly) { this.isDirty = true; } stream.Seek(0L, SeekOrigin.Begin); return(new StreamWrapper(stream, false)); }
private static ICollection <NativeStorePropertyDefinition> GetNativePropertyDefinitions <T>(PropertyDependencyType targetDependencyType, ICollection <T> propertyDefinitions, bool hashSetOrList, Predicate <NativeStorePropertyDefinition> addToCollection) where T : PropertyDefinition { EnumValidator.AssertValid <PropertyDependencyType>(targetDependencyType); if (propertyDefinitions == null) { return(StorePropertyDefinition.EmptyNativeStoreProperties); } int num = (propertyDefinitions.Count >= StorePropertyDefinition.dependencyEstimates.Length) ? propertyDefinitions.Count : StorePropertyDefinition.dependencyEstimates[propertyDefinitions.Count]; ICollection <NativeStorePropertyDefinition> collection = null; Action <NativeStorePropertyDefinition> action; if (hashSetOrList) { HashSet <NativeStorePropertyDefinition> nativePropertyDefinitionsSet = new HashSet <NativeStorePropertyDefinition>(num); action = delegate(NativeStorePropertyDefinition item) { if (addToCollection == null) { nativePropertyDefinitionsSet.TryAdd(item); return; } if (addToCollection(item)) { nativePropertyDefinitionsSet.TryAdd(item); } }; collection = nativePropertyDefinitionsSet; } else { IList <NativeStorePropertyDefinition> loadList = new List <NativeStorePropertyDefinition>(num); action = delegate(NativeStorePropertyDefinition item) { if (addToCollection == null) { loadList.Add(item); return; } if (addToCollection(item)) { loadList.Add(item); } }; collection = loadList; } foreach (T t in propertyDefinitions) { PropertyDefinition propertyDefinition = t; StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(propertyDefinition); storePropertyDefinition.ForEachMatch(targetDependencyType, action); } int count = collection.Count; if (count != num && propertyDefinitions.Count < StorePropertyDefinition.dependencyEstimates.Length) { Interlocked.Exchange(ref StorePropertyDefinition.dependencyEstimates[propertyDefinitions.Count], count); } return(collection); }
private SortOrder GetSortOrder(MapiTable table, SortBy[] sortColumns, GroupByAndOrder[] groupBy, int expandCount, ref List <PropTag> alteredProperties) { if ((sortColumns == null || sortColumns.Length == 0) && (groupBy == null || groupBy.Length == 0)) { return(null); } SortOrder sortOrder = new SortOrder(); if (groupBy != null) { for (int i = 0; i < groupBy.Length; i++) { NativeStorePropertyDefinition nativeGroupBy = InternalSchema.ToStorePropertyDefinition(groupBy[i].GroupByColumn).GetNativeGroupBy(); PropTag sortPropertyTag = this.GetSortPropertyTag(nativeGroupBy, ref alteredProperties); GroupSort nativeGroupSort = InternalSchema.ToStorePropertyDefinition(groupBy[i].GroupSortColumn.ColumnDefinition).GetNativeGroupSort(groupBy[i].GroupSortColumn.SortOrder, groupBy[i].GroupSortColumn.Aggregate); PropTag sortPropertyTag2 = this.GetSortPropertyTag((NativeStorePropertyDefinition)nativeGroupSort.ColumnDefinition, ref alteredProperties); SortFlags sortFlag; switch (nativeGroupSort.Aggregate) { case Aggregate.Min: sortFlag = SortFlags.CategoryMin; break; case Aggregate.Max: sortFlag = SortFlags.CategoryMax; break; default: throw new ArgumentOutOfRangeException("groupBy", nativeGroupSort.Aggregate, ServerStrings.ExInvalidAggregate); } sortOrder.AddCategory(sortPropertyTag, QueryExecutor.SortOrderToSortFlags(nativeGroupSort.SortOrder)); if (sortPropertyTag != sortPropertyTag2) { sortOrder.Add(sortPropertyTag2, sortFlag); } } sortOrder.ExpandCount = expandCount; } if (sortOrder.GetSortCount() > 4) { throw new ArgumentException(ServerStrings.ExTooComplexGroupSortParameter, "groupBy"); } if (sortColumns != null && sortColumns.Length > 0) { SortBy[] nativeSortBy = QueryExecutor.GetNativeSortBy(sortColumns); if (nativeSortBy.Length + sortOrder.GetSortCount() > 6) { throw new ArgumentOutOfRangeException("sortColumns", ServerStrings.ExTooManySortColumns); } for (int j = 0; j < nativeSortBy.Length; j++) { PropertyDefinition columnDefinition = nativeSortBy[j].ColumnDefinition; PropTag sortPropertyTag3 = this.GetSortPropertyTag((NativeStorePropertyDefinition)columnDefinition, ref alteredProperties); sortOrder.Add(sortPropertyTag3, QueryExecutor.SortOrderToSortFlags(nativeSortBy[j].SortOrder)); } } return(sortOrder); }
public virtual Stream OpenPropertyStream(PropertyDefinition propertyDefinition, PropertyOpenMode openMode) { this.CheckDisposed("OpenProperyStream"); EnumValidator.ThrowIfInvalid <PropertyOpenMode>(openMode, "openMode"); InternalSchema.ToStorePropertyDefinition(propertyDefinition); if (!(propertyDefinition is NativeStorePropertyDefinition)) { throw new NotSupportedException(ServerStrings.ExCalculatedPropertyStreamAccessNotSupported(propertyDefinition.Name)); } return(this.PropertyBag.OpenPropertyStream(propertyDefinition, openMode)); }
internal static Dictionary <StorePropertyDefinition, int> CreatePropertyPositionsDictionary(ICollection <PropertyDefinition> columns) { Dictionary <StorePropertyDefinition, int> dictionary = new Dictionary <StorePropertyDefinition, int>(columns.Count); int num = 0; foreach (PropertyDefinition propertyDefinition in columns) { StorePropertyDefinition propertyDefinition2 = (StorePropertyDefinition)propertyDefinition; dictionary.Add(InternalSchema.ToStorePropertyDefinition(propertyDefinition2), num++); } return(dictionary); }
public static IEnumerable <PropValue> ConvertEnumerator <PropDefType>(IEnumerable <KeyValuePair <PropDefType, object> > sourceEnumerator) where PropDefType : PropertyDefinition { if (sourceEnumerator != null) { foreach (KeyValuePair <PropDefType, object> pair in sourceEnumerator) { KeyValuePair <PropDefType, object> keyValuePair = pair; StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(keyValuePair.Key); KeyValuePair <PropDefType, object> keyValuePair2 = pair; yield return(new PropValue(storePropertyDefinition, keyValuePair2.Value)); } } yield break; }
public override PropertyValueTrackingData GetOriginalPropertyInformation(PropertyDefinition propertyDefinition) { StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(propertyDefinition); if ((storePropertyDefinition.PropertyFlags & PropertyFlags.TrackChange) != PropertyFlags.TrackChange) { return(PropertyValueTrackingData.PropertyValueTrackDataNotTracked); } if (this.TrackedPropertyInformation != null && this.TrackedPropertyInformation.ContainsKey(propertyDefinition)) { return(this.TrackedPropertyInformation[propertyDefinition]); } return(PropertyValueTrackingData.PropertyValueTrackDataUnchanged); }
internal static IEnumerable <PropValue> ResolveProperties(MemoryPropertyBag client, MemoryPropertyBag server, MemoryPropertyBag original, AcrProfile profile) { ConflictResolutionResult resolutionResult = profile.ResolveConflicts(MasterCategoryList.GetPropValuesToResolve(client, server, original, profile)); if (resolutionResult.SaveStatus == SaveResult.IrresolvableConflict) { throw new Exception(); } foreach (PropertyConflict conflict in resolutionResult.PropertyConflicts) { yield return(new PropValue(InternalSchema.ToStorePropertyDefinition(conflict.PropertyDefinition), conflict.ResolvedValue)); } yield break; }
public object this[PropertyDefinition propertyDefinition] { get { StorePropertyDefinition other = InternalSchema.ToStorePropertyDefinition(propertyDefinition); for (int i = 0; i < this.columns.Length; i++) { StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(this.columns[i]); if (storePropertyDefinition.CompareTo(other) == 0) { return(this.row[i]); } } return(new PropertyError(propertyDefinition, PropertyErrorCode.NotFound)); } }
private static SortBy[] GetNativeSortBy(SortBy[] originalSortBy) { List <SortBy> list = new List <SortBy>(); for (int i = 0; i < originalSortBy.Length; i++) { SortBy sortBy = originalSortBy[i]; if (sortBy == null) { ExTraceGlobals.StorageTracer.TraceError <int>(0L, "Folder.GetNativeSortBy. SortColumns[i] should not be Null. i = {0}.", i); throw new ArgumentException(ServerStrings.ExNullSortOrderParameter(i)); } StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(sortBy.ColumnDefinition); SortBy[] nativeSortBy = storePropertyDefinition.GetNativeSortBy(sortBy.SortOrder); list.AddRange(nativeSortBy); } return(list.ToArray()); }
internal void LoadDataFromXsoRows(ADObjectId mailboxOwnerId, object[] objectRow, PropertyDefinition[] xsoPropertyDefinitions) { if (mailboxOwnerId == null) { throw new ArgumentNullException("mailboxOwnerId"); } if (objectRow == null) { throw new ArgumentNullException("objectRow"); } if (xsoPropertyDefinitions == null) { throw new ArgumentNullException("xsoPropertyDefinitions"); } if (objectRow.Length != xsoPropertyDefinitions.Length) { throw new ArgumentException("xsoPropertyDefinitions and objectRow length mismatch"); } base.InstantiationErrors.Clear(); this.MailboxOwnerId = mailboxOwnerId; for (int i = 0; i < xsoPropertyDefinitions.Length; i++) { XsoDriverPropertyDefinition relatedWrapperProperty = this.Schema.GetRelatedWrapperProperty(xsoPropertyDefinitions[i]); try { object obj = objectRow[i]; StorePropertyDefinition propertyDefinition = InternalSchema.ToStorePropertyDefinition(xsoPropertyDefinitions[i]); if (obj != null) { this.propertyBag.SetField(relatedWrapperProperty, PropertyBag.CheckPropertyValue <object>(propertyDefinition, obj, null)); } } catch (StoragePermanentException ex) { base.InstantiationErrors.Add(new PropertyValidationError(ex.LocalizedString, relatedWrapperProperty, null)); } } }
public void SetProperty(PropertyDefinition propertyDefinition, object value) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); this.SetProperty(propertyDefinition2, value); }
internal object TryGetProperty(PropertyDefinition property) { StorePropertyDefinition property2 = InternalSchema.ToStorePropertyDefinition(property); return(this.TryGetProperty(property2)); }
public void SetOrDeleteProperty(PropertyDefinition propertyDefinition, object propertyValue) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); this.SetOrDeleteProperty(propertyDefinition2, propertyValue); }
public T?GetValueAsNullable <T>(PropertyDefinition propertyDefinition) where T : struct { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); return(this.GetValueAsNullable <T>(propertyDefinition2)); }
public T GetValueOrDefault <T>(PropertyDefinition propertyDefinition, T defaultValue) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); return(this.GetValueOrDefault <T>(propertyDefinition2, defaultValue)); }
public bool IsPropertyDirty(PropertyDefinition propertyDefinition) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); return(this.IsPropertyDirty(propertyDefinition2)); }
public void Delete(PropertyDefinition propertyDefinition) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); this.Delete(propertyDefinition2); }
internal PropertyError[] DeleteProperties(ICollection <PropertyDefinition> propertyDefinitions) { this.CheckDisposed("DeleteProperties"); if (propertyDefinitions == null) { throw new ArgumentNullException(ServerStrings.ExNullParameter("propertyDefinitions", 1)); } if (propertyDefinitions.Count == 0) { ExTraceGlobals.StorageTracer.TraceError <string>((long)this.GetHashCode(), "MapiPropertyBag::DeleteProperties. {0} contain zero elements.", "propertyDefinitions"); throw new ArgumentException(ServerStrings.ExEmptyCollection("propertyDefinitions"), "propertyDefinitions"); } IList <PropertyDefinition> list = new List <PropertyDefinition>(); IList <PropertyDefinition> list2 = new List <PropertyDefinition>(); foreach (PropertyDefinition propertyDefinition in propertyDefinitions) { StorePropertyDefinition storePropertyDefinition = InternalSchema.ToStorePropertyDefinition(propertyDefinition); NativeStorePropertyDefinition nativeStorePropertyDefinition = storePropertyDefinition as NativeStorePropertyDefinition; if (nativeStorePropertyDefinition != null) { list.Add(storePropertyDefinition); } else { list2.Add(storePropertyDefinition); } } ICollection <PropTag> tags = PropertyTagCache.Cache.PropTagsFromPropertyDefinitions <PropertyDefinition>(this.MapiProp, this.storeSession, false, list); PropProblem[] array = null; StoreSession storeSession = this.StoreSession; bool flag = false; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } array = this.MapiProp.DeleteProps(tags, (this.SaveFlags & PropertyBagSaveFlags.NoChangeTracking) != PropertyBagSaveFlags.NoChangeTracking); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotDeleteProperties, ex, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiPropertyBag::SetProperty. MapiProp = {0}.", this.MapiProp), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.MapiCannotDeleteProperties, ex2, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiPropertyBag::SetProperty. MapiProp = {0}.", this.MapiProp), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } PropertyError[] array2; if (array != null || list2.Count > 0) { int num = list2.Count; if (array != null) { num += array.Length; } array2 = new PropertyError[num]; int num2 = 0; if (array != null) { int i = 0; while (i < array.Length) { int scode = array[i].Scode; string errorDescription; PropertyErrorCode error = MapiPropertyHelper.MapiErrorToXsoError(scode, out errorDescription); PropertyError propertyError = new PropertyError(list[array[i].Index], error, errorDescription); array2[num2] = propertyError; ExTraceGlobals.StorageTracer.TraceError <string, PropertyError>((long)this.GetHashCode(), "MapiPropertyBag::DeleteProperties. Failed. DisplayName = {0}, Error = {1}.", list[array[i].Index].Name, propertyError); i++; num2++; } } int count = list2.Count; int j = 0; while (j < count) { PropertyError propertyError2 = new PropertyError(list2[j], PropertyErrorCode.SetCalculatedPropertyError, ServerStrings.ExSetNotSupportedForCalculatedProperty(list2[j].Name)); array2[num2] = propertyError2; ExTraceGlobals.StorageTracer.TraceError <string, PropertyError>((long)this.GetHashCode(), "MapiPropertyBag::DeleteProperties. Failed. DisplayName = {0}, Error = {1}.", list2[j].Name, propertyError2); j++; num2++; } } else { array2 = MapiPropertyBag.EmptyPropertyErrorArray; } return(array2); }
internal object[] GetProperties(IList <NativeStorePropertyDefinition> propertyDefinitions) { this.CheckDisposed("GetProperties"); if (propertyDefinitions == null) { ExTraceGlobals.StorageTracer.TraceError <string>((long)this.GetHashCode(), "MapiPropertyBag::GetProperties. {0} == null.", "propertyDefinitions"); throw new ArgumentNullException("propertyDefinitions"); } int count = propertyDefinitions.Count; if (count == 0) { ExTraceGlobals.StorageTracer.TraceError <string>((long)this.GetHashCode(), "MapiPropertyBag::GetProperties. {0} contain zero elements.", "propertyDefinitions"); throw new ArgumentException(ServerStrings.ExEmptyCollection("propertyDefinitions"), "propertyDefinitions"); } object[] array = new object[count]; ICollection <PropTag> collection = PropertyTagCache.Cache.PropTagsFromPropertyDefinitions(this.MapiProp, this.storeSession, true, !this.storeSession.Capabilities.IsReadOnly, !this.storeSession.Capabilities.IsReadOnly, propertyDefinitions); PropValue[] array2 = null; StoreSession storeSession = this.StoreSession; bool flag = false; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } array2 = this.MapiProp.GetProps(collection); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.ExGetPropsFailed, ex, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiPropertyBag::GetProperties. MapiProp = {0}.", this.MapiProp), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.ExGetPropsFailed, ex2, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiPropertyBag::GetProperties. MapiProp = {0}.", this.MapiProp), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } for (int i = 0; i < count; i++) { array[i] = MapiPropertyBag.GetValueFromPropValue(this.storeSession, this.ExTimeZone, InternalSchema.ToStorePropertyDefinition(propertyDefinitions[i]), array2[i]); } this.RetryBigProperties(propertyDefinitions, collection, array); return(array); }
protected object GetProperty(PropertyDefinition propertyDefinition) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); return(this.GetProperty(propertyDefinition2)); }
private void RetryBigProperties(IList <NativeStorePropertyDefinition> allPropDefs, ICollection <PropTag> allPropTags, object[] allValues) { List <int> list = null; int count = allPropDefs.Count; for (int i = 0; i < count; i++) { if (PropertyError.IsPropertyValueTooBig(allValues[i]) && MapiPropertyBag.IsPropertyRetriable(allPropDefs[i])) { if (list == null) { list = new List <int>(10); } list.Add(i); } } if (list == null) { return; } PropTag[] array = new PropTag[count]; allPropTags.CopyTo(array, 0); bool flag = true; while (flag && list.Count > 0) { flag = false; PropTag[] array2 = new PropTag[list.Count]; for (int j = 0; j < array2.Length; j++) { array2[j] = array[list[j]]; } PropValue[] array3 = null; StoreSession storeSession = this.StoreSession; bool flag2 = false; try { if (storeSession != null) { storeSession.BeginMapiCall(); storeSession.BeginServerHealthCall(); flag2 = true; } if (StorageGlobals.MapiTestHookBeforeCall != null) { StorageGlobals.MapiTestHookBeforeCall(MethodBase.GetCurrentMethod()); } array3 = this.mapiProp.GetProps(array2); } catch (MapiPermanentException ex) { throw StorageGlobals.TranslateMapiException(ServerStrings.ExGetPropsFailed, ex, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiPropertyBag::RetryBigProperties. MapiProp = {0}.", this.MapiProp), ex }); } catch (MapiRetryableException ex2) { throw StorageGlobals.TranslateMapiException(ServerStrings.ExGetPropsFailed, ex2, storeSession, this, "{0}. MapiException = {1}.", new object[] { string.Format("MapiPropertyBag::RetryBigProperties. MapiProp = {0}.", this.MapiProp), ex2 }); } finally { try { if (storeSession != null) { storeSession.EndMapiCall(); if (flag2) { storeSession.EndServerHealthCall(); } } } finally { if (StorageGlobals.MapiTestHookAfterCall != null) { StorageGlobals.MapiTestHookAfterCall(MethodBase.GetCurrentMethod()); } } } for (int k = array3.Length - 1; k >= 0; k--) { int num = list[k]; object valueFromPropValue = MapiPropertyBag.GetValueFromPropValue(this.storeSession, this.ExTimeZone, InternalSchema.ToStorePropertyDefinition(allPropDefs[num]), array3[k]); if (!PropertyError.IsPropertyValueTooBig(valueFromPropValue)) { allValues[num] = valueFromPropValue; list.RemoveAt(k); flag = true; } } } }
public object TryGetProperty(PropertyDefinition propertyDefinition) { StorePropertyDefinition propertyDefinition2 = InternalSchema.ToStorePropertyDefinition(propertyDefinition); return(this.TryGetProperty(propertyDefinition2)); }