Beispiel #1
0
 public PrefValImpl(
     string key, IPrefValueRW <A> rw, A defaultVal,
     IPrefValueBackend backend, bool saveOnEveryWrite
     )
 {
     this.key              = key;
     writer                = rw;
     this.backend          = backend;
     this.saveOnEveryWrite = saveOnEveryWrite;
     _value                = persist(rw.read(backend, key, defaultVal));
 }
Beispiel #2
0
 public PrefVal <A> create <A>(
     string key, A defaultVal, IPrefValueRW <A> rw
     ) => new PrefValImpl <A>(key, rw, defaultVal, backend);
Beispiel #3
0
 public PrefVal <A> create <A>(
     string key, A defaultVal, IPrefValueRW <A> rw, bool saveOnEveryWrite = true
     ) => new PrefValImpl <A>(key, rw, defaultVal, backend, saveOnEveryWrite);