Ejemplo n.º 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));
 }
Ejemplo n.º 2
0
 public PrefVal <A> create <A>(
     string key, A defaultVal, IPrefValueRW <A> rw
     ) => new PrefValImpl <A>(key, rw, defaultVal, backend);
Ejemplo n.º 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);