Ejemplo n.º 1
0
 public static ICachedBlob <string> toStringBlob(
     this ICachedBlob <byte[]> blob, Encoding encoding = null
     ) => blob.bimap(BiMapper.byteArrString(encoding));
Ejemplo n.º 2
0
 public ICachedBlobMapper(ICachedBlob <A> backing, BiMapper <A, B> bimap)
 {
     this.backing = backing;
     this.bimap   = bimap;
 }
Ejemplo n.º 3
0
 public static ICachedBlob <B> bimap <A, B>(
     this ICachedBlob <A> blob, BiMapper <A, B> bimap
     ) => new ICachedBlobMapper <A, B>(blob, bimap);
Ejemplo n.º 4
0
 public ICachedBlobTestBiMap()
 {
     blob       = new ICachedBlobTestImpl <int>();
     mappedBlob = blob.bimap(BiMapper.a <int, string>(i => i.ToString(), int.Parse));
 }