Пример #1
0
 public void Append(byte[] buffer)
 {
     using (var file = OpenForWrite())
     {
         var versionToWrite = 1;
         _serializer.WriteRecord(file, buffer, versionToWrite);
     }
 }
Пример #2
0
        public void Append(byte[] buffer)
        {
            byte[] orig = null;

            if (_blob.Exists())
            {
                using (var fileRead = _blob.OpenRead())
                {
                    orig = _blob.DownloadByteArray();
                }
            }

            using (var fileWrite = _blob.OpenWrite())
            {
                var versionToWrite = 1;
                if (orig != null)
                {
                    fileWrite.Write(orig, 0, orig.Length);
                }
                _serializer.WriteRecord(fileWrite, buffer, versionToWrite);
            }
        }