Exemplo n.º 1
0
        /// <summary>
        /// Saves using the specified writer.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <returns>true if successful</returns>
        public bool Save(IKeySetWriter writer)
        {
            writer.Write(_metadata);

            if (!onlyMetaChanged || writer is INonSeparatedMetadataAndKey)
            {
                for (int i = 1; i <= _keys.Count; i++)
                {
                    var key = _keys[i];
                    writer.Write(key, i);
                }
            }
            return(writer.Finish());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Saves using the specified writer.
        /// </summary>
        /// <param name="writer">The writer.</param>
        /// <returns>true if successful</returns>
        public bool Save(IKeySetWriter writer)
        {
            writer.Write(_metadata);

            if (!onlyMetaChanged || writer is INonSeparatedMetadataAndKey)
            {
                for (int i = 1; i <= _keys.Count; i++)
                {
                    var key = _keys[i];
                    writer.Write(key, i);
                }
            }
            return writer.Finish();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Finishes this writing of the key.
 /// </summary>
 /// <returns></returns>
 public bool Finish() => _writer.Finish();
Exemplo n.º 4
0
 public bool Finish()
 {
     return(_writer.Finish());
 }