Run dotnet format

This commit is contained in:
nicolas.dorier
2020-06-28 17:55:27 +09:00
parent 18abc4913b
commit 51514252b6
290 changed files with 1916 additions and 1881 deletions

View File

@@ -28,8 +28,8 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
{
return Path.Combine(options.DataDir, LocalStorageDirectoryName);
}
public static string GetTempStorageDir(BTCPayServerOptions options)
{
return Path.Combine(GetStorageDir(options), "tmp");
@@ -48,7 +48,7 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
public override async Task<string> GetFileUrl(Uri baseUri, StoredFile storedFile, StorageSettings configuration)
{
var baseResult = await base.GetFileUrl(baseUri, storedFile, configuration);
var url = new Uri(baseUri,LocalStorageDirectoryName );
var url = new Uri(baseUri, LocalStorageDirectoryName);
return baseResult.Replace(new DirectoryInfo(GetStorageDir(_options)).FullName, url.AbsoluteUri,
StringComparison.InvariantCultureIgnoreCase);
}
@@ -60,8 +60,8 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
var localFileDescriptor = new TemporaryLocalFileDescriptor()
{
Expiry = expiry,
FileId = storedFile.Id,
Expiry = expiry,
FileId = storedFile.Id,
IsDownload = isDownload
};
var name = Guid.NewGuid().ToString();
@@ -70,10 +70,10 @@ namespace BTCPayServer.Storage.Services.Providers.FileSystemStorage
{
File.Create(fullPath).Dispose();
}
await File.WriteAllTextAsync(Path.Combine(GetTempStorageDir(_options), name), JsonConvert.SerializeObject(localFileDescriptor));
return new Uri(baseUri,$"{LocalStorageDirectoryName}tmp/{name}{(isDownload ? "?download" : string.Empty)}").AbsoluteUri;
return new Uri(baseUri, $"{LocalStorageDirectoryName}tmp/{name}{(isDownload ? "?download" : string.Empty)}").AbsoluteUri;
}
}
}