コード例 #1
0
 public static async Task <IResourceInfo> WriteTextFileAsync(this IResourceProvider resourceProvider, string path, string value, IImmutableSession metadata = default)
 {
     using (var stream = await ResourceHelper.SerializeTextAsync(value, metadata.ThisOrEmpty().Get(Use <IAnyNamespace> .Namespace, x => x.Encoding, Encoding.UTF8)))
     {
         return(await resourceProvider.PutAsync(CreateUri(path), stream, metadata.ThisOrEmpty().Set(Use <IResourceNamespace> .Namespace, x => x.Format, MimeType.Text)));
     }
 }
コード例 #2
0
 public PhysicalFileProvider(IImmutableSession metadata = default)
     : base(metadata.ThisOrEmpty())
 {
 }
コード例 #3
0
 public static async Task <IResourceInfo> DeleteFileAsync(this IResourceProvider resourceProvider, string path, IImmutableSession metadata = default)
 {
     return(await resourceProvider.DeleteAsync(CreateUri(path), metadata.ThisOrEmpty().Set(Use <IResourceNamespace> .Namespace, x => x.Format, MimeType.Text)));
 }