Exemplo n.º 1
0
 static public IFileStoreWriter WithMappedPath(
     this IFileStoreWriter originalFileStore, System.Func <IImmutableList <string>, IImmutableList <string> > pathMap) =>
 new DelegatingFileStoreWriter
 {
     SetFileContentDelegate    = pathAndFileContent => originalFileStore.SetFileContent(pathMap(pathAndFileContent.path), pathAndFileContent.fileContent),
     AppendFileContentDelegate = pathAndFileContent => originalFileStore.AppendFileContent(pathMap(pathAndFileContent.path), pathAndFileContent.fileContent),
     DeleteFileDelegate        = originalPath => originalFileStore.DeleteFile(pathMap(originalPath)),
 };
Exemplo n.º 2
0
 public void SetFileContent(IImmutableList <string> path, IReadOnlyList <byte> fileContent) =>
 writer.SetFileContent(path, fileContent);
Exemplo n.º 3
0
 public void SetFileContent(IImmutableList <string> path, byte[] fileContent) =>
 writer.SetFileContent(path, fileContent);