Example #1
0
        public static object GetBlobValue(this IActiveRecord wrapper, FieldAttribute attribute)
        {
            IMemoryBlobStream blobStream = wrapper.UnderlyingObject.get_Value(attribute.Index) as IMemoryBlobStream;

            if (blobStream == null)
            {
                return(null);
            }

            IObjectStream stream = new ObjectStreamClass()
            {
                Stream = blobStream
            };

            IPersistStream blob = new PropertySetClass();

            blob.Load(blobStream);

            return(blob as IPropertySet);
        }
        public static object GetBlobValue(this IActiveRecord wrapper, FieldAttribute attribute)
        {
            IMemoryBlobStream blobStream = wrapper.UnderlyingObject.get_Value(attribute.Index) as IMemoryBlobStream;

            if (blobStream == null)
                return null;

            IObjectStream stream = new ObjectStreamClass() { Stream = blobStream };

            IPersistStream blob = new PropertySetClass();
            blob.Load(blobStream);

            return blob as IPropertySet;
        }