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.GetBinaryStream(OwnerNode.Id, OwnerNode.VersionId, PropertyType.Id));
}