Convert to file-scoped namespace

This commit is contained in:
Dennis Reimann 2024-04-04 11:00:18 +02:00
parent c7a8523b77
commit 620ebc751c
No known key found for this signature in database
GPG key ID: 5009E1797F03F8D0
11 changed files with 2590 additions and 2601 deletions

View file

@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NBitcoin;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}")]
@ -168,4 +168,3 @@ namespace BTCPayServer.Controllers
}
}
}

View file

@ -15,8 +15,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using MimeKit;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/emails")]
@ -266,4 +266,3 @@ namespace BTCPayServer.Controllers
return emailSender is not null && (await emailSender.GetEmailSettings())?.IsComplete() == true;
}
}
}

View file

@ -13,8 +13,8 @@ using Microsoft.AspNetCore.Mvc;
using NBitcoin;
using NBitcoin.DataEncoders;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
private async Task<Data.WebhookDeliveryData?> LastDeliveryForWebhook(string webhookId)
@ -188,4 +188,3 @@ namespace BTCPayServer.Controllers
return File(delivery.GetBlob().Request, "application/json");
}
}
}

View file

@ -16,8 +16,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/lightning/{cryptoCode}")]
@ -340,4 +340,3 @@ namespace BTCPayServer.Controllers
return store.GetPaymentMethodConfig<T>(paymentMethodId, _handlers);
}
}
}

View file

@ -24,8 +24,8 @@ using NBXplorer.DerivationStrategy;
using NBXplorer.Models;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/onchain/{cryptoCode}")]
@ -862,4 +862,3 @@ namespace BTCPayServer.Controllers
return new DerivationSchemeSettings(strategy, network);
}
}
}

View file

@ -14,8 +14,8 @@ using BTCPayServer.Rating;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/rates")]
@ -187,4 +187,3 @@ namespace BTCPayServer.Controllers
.OrderBy(s => s.DisplayName, StringComparer.OrdinalIgnoreCase);
}
}
}

View file

@ -9,8 +9,8 @@ using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/roles")]
@ -156,4 +156,3 @@ namespace BTCPayServer.Controllers
return RedirectToAction(nameof(ListRoles), new { storeId });
}
}
}

View file

@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/settings")]
@ -444,4 +444,3 @@ namespace BTCPayServer.Controllers
return defaultChoice is null ? null : choices.FirstOrDefault(c => defaultChoice.ToString().Equals(c.Value, StringComparison.OrdinalIgnoreCase));
}
}
}

View file

@ -14,8 +14,8 @@ using Microsoft.AspNetCore.Mvc.Rendering;
using NBitcoin;
using NBitcoin.DataEncoders;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/tokens")]
@ -259,4 +259,3 @@ namespace BTCPayServer.Controllers
});
}
}
}

View file

@ -14,8 +14,8 @@ using BTCPayServer.Services.Stores;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
public partial class UIStoresController
{
[HttpGet("{storeId}/users")]
@ -145,4 +145,3 @@ namespace BTCPayServer.Controllers
}).ToList();
}
}
}

View file

@ -24,8 +24,8 @@ using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.Options;
using StoreData = BTCPayServer.Data.StoreData;
namespace BTCPayServer.Controllers
{
namespace BTCPayServer.Controllers;
[Route("stores")]
[Authorize(AuthenticationSchemes = AuthenticationSchemes.Cookie)]
[Authorize(Policy = Policies.CanViewStoreSettings, AuthenticationSchemes = AuthenticationSchemes.Cookie)]
@ -161,4 +161,3 @@ namespace BTCPayServer.Controllers
return User.Identity?.AuthenticationType != AuthenticationSchemes.Cookie ? null : _userManager.GetUserId(User);
}
}
}