public PersistablePropertyBag CreateStorePropertyBag(PropertyBag propertyBag, ICollection <PropertyDefinition> prefetchPropertyArray) { PersistablePropertyBag persistablePropertyBag = ItemBagFactory.CreatePropertyBag(this.storeSession, this.id, prefetchPropertyArray); persistablePropertyBag.ExTimeZone = this.exTimeZone; return(persistablePropertyBag); }
public PersistablePropertyBag CreateStorePropertyBag(PropertyBag propertyBag, ICollection <PropertyDefinition> prefetchProperties) { byte[] entryId = propertyBag.TryGetProperty(InternalSchema.EntryId) as byte[]; StoreObjectId id = StoreObjectId.FromProviderSpecificId(entryId, StoreObjectType.Unknown); StoreObjectPropertyBag storeObjectPropertyBag = propertyBag as StoreObjectPropertyBag; ICollection <PropertyDefinition> prefetchPropertyArray; if (storeObjectPropertyBag != null) { prefetchPropertyArray = ((prefetchProperties != null) ? prefetchProperties.Union(storeObjectPropertyBag.PrefetchPropertyArray) : storeObjectPropertyBag.PrefetchPropertyArray); } else { prefetchPropertyArray = prefetchProperties; } PersistablePropertyBag persistablePropertyBag = ItemBagFactory.CreatePropertyBag(this.storeSession, id, prefetchPropertyArray); persistablePropertyBag.ExTimeZone = this.exTimeZone; return(persistablePropertyBag); }