Class CollectionOnDrive
- Namespace
- SunamoCollectionOnDrive
- Assembly
- SunamoCollectionOnDrive.dll
A collection of strings that persists its content to a file on disk.
public sealed class CollectionOnDrive : CollectionOnDriveBase<string>, IList<string>, ICollection<string>, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IList, ICollection, IEnumerable
- Inheritance
-
CollectionOnDrive
- Implements
- Inherited Members
- Extension Methods
Constructors
CollectionOnDrive(ILogger)
Initializes a new instance of the CollectionOnDrive class.
public CollectionOnDrive(ILogger logger)
Parameters
loggerILoggerLogger instance for logging operations.
Properties
Dummy
Dummy instance for testing or default scenarios. Do not use for production - will throw exception on operations.
public static CollectionOnDrive Dummy { get; set; }
Property Value
Methods
Load(bool)
Loads the collection from the configured file path.
public override Task Load(bool isRemovingDuplicates)
Parameters
isRemovingDuplicatesboolWhether to remove duplicate entries when loading.
Returns
Load(string, bool)
Loads the collection from the specified file path.
public Task Load(string path, bool isRemovingDuplicates)
Parameters
pathstringPath to the file to load from.
isRemovingDuplicatesboolWhether to remove duplicate entries when loading.