internal object TryGetProperty(StorePropertyDefinition propertyDefinition)
 {
     if (propertyDefinition == null)
     {
         throw new ArgumentNullException("propertyDefinition");
     }
     return(propertyDefinition.Get(this.storageItf));
 }
Exemple #2
0
 protected override object TryGetStoreProperty(StorePropertyDefinition propertyDefinition)
 {
     base.CheckDisposed("AttachmentPropertyBag::TryGetStoreProperty");
     if (this.persistablePropertyBag == null)
     {
         NativeStorePropertyDefinition nativeStorePropertyDefinition = propertyDefinition as NativeStorePropertyDefinition;
         if (nativeStorePropertyDefinition == null)
         {
             return(propertyDefinition.Get((PropertyBag.BasicPropertyStore) this));
         }
         if (this.attachmentTablePropertySet.Contains(nativeStorePropertyDefinition))
         {
             object        value         = ((IDirectPropertyBag)this.attachmentTablePropertyBag).GetValue(nativeStorePropertyDefinition);
             PropertyError propertyError = value as PropertyError;
             if (propertyError == null || propertyError.PropertyErrorCode != PropertyErrorCode.PropertyValueTruncated)
             {
                 return(value);
             }
         }
         this.OnOpenConnection();
     }
     return(((IDirectPropertyBag)this.CurrentPropertyBag).GetValue(propertyDefinition));
 }