GetBinaryStream2() static private method

static private GetBinaryStream2 ( int nodeId, int versionId, int propertyTypeId ) : RepositoryStream
nodeId int
versionId int
propertyTypeId int
return SenseNet.ContentRepository.Storage.Data.RepositoryStream
Beispiel #1
0
        public Stream GetStream()
        {
            var raw = RawData;

            if (raw == null)
            {
                return(null);
            }
            var stream = raw.Stream;

            if (stream != null)
            {
                return(CloneStream(stream));
            }
            if (OwnerNode == null)
            {
                return(null);
            }

            // Itt töltöm be, és adom vissza a Stream-et.
            // Ezt kéne megoldani úgy, hogy RepositoryStream-et adok vissza - a RepositoryStream-et ezek szerint VersionId - PropTypeId-val kell kezelni
            // A cache felelõsséget most átnyomom a DBS-re

            return(DataBackingStore.GetBinaryStream2(OwnerNode.Id, OwnerNode.VersionId, PropertyType.Id));
            //return DataBackingStore.GetBinaryStream(OwnerNode.VersionId, PropertyType.Id);
        }
Beispiel #2
0
        public Stream GetStream()
        {
            var raw = RawData;

            if (raw == null)
            {
                return(null);
            }
            var stream = raw.Stream;

            if (stream != null)
            {
                return(CloneStream(stream));
            }
            if (OwnerNode == null)
            {
                return(null);
            }

            if (this.OwnerNode.SavingState != ContentSavingState.Finalized)
            {
                throw new InvalidOperationException(SR.GetString(SR.Exceptions.General.Error_AccessToNotFinalizedBinary_2, this.OwnerNode.Path, this.PropertyType.Name));
            }

            return(DataBackingStore.GetBinaryStream2(OwnerNode.Id, OwnerNode.VersionId, PropertyType.Id));
            //return DataBackingStore.GetBinaryStream(OwnerNode.VersionId, PropertyType.Id);
        }