Exemple #1
0
        private Stream EnsurceBackgroundStream()
        {
            if (IsSnapShot)
            {
                return(StreamSource.OpenStream(FileAccess.ReadWrite));
            }

            return(_backgroundStream.Stream ??
                   (_backgroundStream.Stream = StreamSource.OpenStream(SerializerMode == SerializerMode.Deserialize
                       ? FileAccess.Read
                       : FileAccess.Write)));
        }