C# Class Rainy.FileSystemBackend.DirectoryBasedNoteRepository

Note repository. There may only exists one repository of a username at any given time in memory. When trying to create another one of the same username, the thread will block until the previous repository of that user was disposed. Best is to always use using (new NoteRepository (username)) { ... } to make sure the repository is freed afterwards.
Inheritance: Rainy.Interfaces.INoteRepository
Show file Open project: Dynalon/Rainy

Protected Properties

Property Type Description
manifestPath string
notesBasePath string
storage IStorage
storagePath string
userLocks Semaphore>.Dictionary

Public Methods

Method Description
DirectoryBasedNoteRepository ( string username, string notes_base_path ) : System
Dispose ( ) : void

Method Details

DirectoryBasedNoteRepository() public method

public DirectoryBasedNoteRepository ( string username, string notes_base_path ) : System
username string
notes_base_path string
return System

Dispose() public method

public Dispose ( ) : void
return void

Property Details

manifestPath protected property

protected string manifestPath
return string

notesBasePath protected property

protected string notesBasePath
return string

storage protected property

protected IStorage storage
return IStorage

storagePath protected property

protected string storagePath
return string

userLocks protected static property

protected static Dictionary userLocks
return Semaphore>.Dictionary