tarsave
  • Documentation
    • Introduction
    • Installation
    • How to Use
      • DataPersistenceConfig
      • Encryption
      • Compression
      • DataPersistenceBuilder
        • SetDataPersistenceConfig
        • Build
      • DataPersistenceService
        • Save
        • SaveAsync
        • AutoSaveAsync
        • Load
        • LoadAsync
        • Delete
        • DeleteAll
      • Transform Data
      • Audio Data
  • Log
    • Change Log
      • v1.0.6
      • v1.0.5
      • v1.0.4
      • v1.0.3
      • v1.0.2
Powered by GitBook
On this page
  1. Documentation
  2. How to Use
  3. DataPersistenceService

Save

bool Save<T>(string key, T data)

Purpose: Saves data of type T to a specified file path.

Parameters:

  • key: A string that is used to determine the file path.

  • data: The data to be saved, constrained to reference types (classes).

Return Value: Returns true if the save operation was successful, false otherwise

public void Save()
{
    bool result = _dataPersistenceService.Save("Key", _data);
}
PreviousDataPersistenceServiceNextSaveAsync

Last updated 6 months ago