コード例 #1
0
ファイル: VaultWriter.cs プロジェクト: funk-yourself/VaultLib
        /// <summary>
        /// Initializes a new instance of the <see cref="VaultWriter"/> class.
        /// </summary>
        /// <param name="vault">The <see cref="VaultLib.Core.Vault"/> instance to generate data for.</param>
        /// <param name="options">The options for the saving process.</param>
        public VaultWriter(Vault vault, VaultSaveOptions options)
        {
            Vault         = vault;
            Options       = options;
            ExportManager = new VaultExportManager(vault);

            Vault.SaveContext = new VaultSaveContext(options)
            {
                Collections   = vault.Database.RowManager.GetCollectionsInVault(vault).ToList(),
                Pointers      = new HashSet <VltPointer>(VltPointer.FixUpOffsetDestinationTypeComparer),
                Strings       = new HashSet <string>(),
                StringOffsets = new Dictionary <string, long>()
            };

            ExportManager.BuildVaultExports();
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VaultSaveContext"/> class.
 /// </summary>
 /// <param name="options">The options to use in the saving process.</param>
 public VaultSaveContext(VaultSaveOptions options)
 {
     Options = options;
 }