|
ShopPlatform.Web 1.0.0.0
농산물, 소프트웨어 라이선스와 개발 용역을 직접 판매하는 CodeMaru 직영 쇼핑몰입니다.
|
함수 | |
| builder.Configuration. | AddUserSecrets ("codemaru-oauth-2ba4e1b2") |
| builder.Services. | AddSingleton (shopOpts) |
| builder.Services. | AddDreamineIdentityWeb (authOptions, usersDbPath) |
| builder.Services. | AddSingleton< IShopTenantStore, JsonShopTenantStore > () |
| builder.Services. | AddScoped< TenantContext > () |
| builder.Services. | AddSingleton< PaymentKeyProtector > () |
| builder.Services. | AddSingleton< TenantDbContextFactory > () |
| builder.Services. | AddHttpClient () |
| builder.Services. | AddScoped< CartService > () |
| builder.Services. | AddScoped< ShopCustomerSession > () |
| builder.Services. | AddScoped< ShopUserContext > () |
| builder.Services. | AddSingleton< ShopCustomerProfileStore > () |
| builder.Services. | AddScoped< ShopCustomerLoginSync > () |
| builder.Services. | AddRazorComponents () .AddInteractiveServerComponents() |
| builder.Services. | AddResponseCompression (o=> o.EnableForHttps=true) |
| if (!app::Environment::IsDevelopment()) | |
| app. | UseForwardedHeaders () |
| app. | UseResponseCompression () |
| app. | UseStaticFiles () |
| app. | UseStaticFiles (new StaticFileOptions { FileProvider=new Microsoft.Extensions.FileProviders.PhysicalFileProvider(shopOpts.ResolvedDataPath), RequestPath="/shop-img" }) |
| app. | UseMiddleware< TenantMiddleware > () |
| app. | UseAuthentication () |
| app. | UseAuthorization () |
| app. | UseAntiforgery () |
| app. | UseMiddleware< OgBotMiddleware > () |
| app. | MapGet ("/healthz",()=> Results.Text("OK", "text/plain")) |
| app. | MapGet ("/pay/{slug}/return", async(string slug, string paymentKey, string orderId, int amount, IShopTenantStore store, PaymentKeyProtector protector, IHttpClientFactory httpFactory, TenantDbContextFactory dbFactory)=> { var config=await store.GetAsync(slug);if(config==null) return Results.NotFound();IPaymentGateway gateway=config.Payment.IsEnabled ? new TossPaymentGateway(httpFactory.CreateClient(), config.Payment, protector) :new DummyPaymentGateway();var result=await gateway.ConfirmAsync(paymentKey, orderId, amount);if(!result.Succeeded) return Results.Redirect($"/{slug}/checkout?error={Uri.EscapeDataString(result.Error ?? "결제 실패")}");using var db=dbFactory.Create(slug);var order=db.Orders .Include(o=> o.Lines) .FirstOrDefault(o=> o.OrderNo==orderId);if(order !=null) { order.Status="paid";order.TransactionId=result.TransactionId;DeductStock(db, order.Lines);await db.SaveChangesAsync();} return Results.Redirect($"/{slug}/order/{orderId}?paid=1");}) |
| app. | MapGet ("/pay/{slug}/fail",(string slug, string? code, string? message)=> Results.Redirect($"/{slug}/checkout?error={Uri.EscapeDataString(message ?? "결제가 취소되었습니다.")}")) |
| app. | MapRazorComponents< ShopPlatform.Components.App > () .AddInteractiveServerRenderMode() |
| ShopPlatform.Services.OgImageGenerator. | EnsureDefault (wwwroot) |
| await ShopPlatform.Data.ShopSeeder. | SeedCodemaruAsync (app.Services.GetRequiredService< TenantDbContextFactory >(), app.Services.GetRequiredService< IShopTenantStore >(), app.Services.GetRequiredService< PaymentKeyProtector >()) |
| app. | Run () |
| static void | DeductStock (TenantDbContext db, IEnumerable< OrderLine > lines) |
| static string | ResolvePath (string? configuredPath, string fallback) |
변수 | |
| var | builder = WebApplication.CreateBuilder(args) |
| var | shopOpts = ShopOptions.From(builder.Configuration) |
| AuthOptions | authOptions |
| string | usersDbPath |
| var | app = builder.Build() |
| var | wwwroot = Path.Combine(app.Environment.ContentRootPath, "wwwroot") |
| builder.Services. AddDreamineIdentityWeb | ( | authOptions | , |
| usersDbPath | ) |
다음을 참조함 : authOptions, builder, usersDbPath.
| builder.Services. AddHttpClient | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddRazorComponents | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddResponseCompression | ( | o | , |
| o. | EnableForHttps = true ) |
다음을 참조함 : builder.
| builder.Services. AddScoped< CartService > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddScoped< ShopCustomerLoginSync > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddScoped< ShopCustomerSession > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddScoped< ShopUserContext > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddScoped< TenantContext > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddSingleton< IShopTenantStore, JsonShopTenantStore > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddSingleton< PaymentKeyProtector > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddSingleton< ShopCustomerProfileStore > | ( | ) |
다음을 참조함 : builder.
| builder.Services. AddSingleton< TenantDbContextFactory > | ( | ) |
다음을 참조함 : builder.
| builder.Configuration. AddUserSecrets | ( | "codemaru-oauth-2ba4e1b2" | ) |
다음을 참조함 : builder.
|
static |
Program.cs 파일의 171 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : MapGet().

| if | ( | ! | app::Environment::IsDevelopment() | ) |
Program.cs 파일의 55 번째 라인에서 정의되었습니다.
다음을 참조함 : app.
| app. MapGet | ( | "/healthz" | , |
| () | , | ||
| Results. | Text"OK", "text/plain" ) |
다음을 참조함 : app.
| app. MapGet | ( | "/pay/{slug}/fail" | , |
| (string slug, string? code, string? message) | , | ||
| Results. | Redirect$"/{slug}/checkout?error={Uri.EscapeDataString(message ?? "결제가 취소되었습니다.")}" ) |
다음을 참조함 : app.
| app. MapGet | ( | "/pay/{slug}/return" | , |
| async(string slug, string paymentKey, string orderId, int amount, IShopTenantStore store, PaymentKeyProtector protector, IHttpClientFactory httpFactory, TenantDbContextFactory dbFactory) | , | ||
| { var config=await store.GetAsync(slug);if(config==null) return Results.NotFound();IPaymentGateway gateway=config.Payment.IsEnabled ? new TossPaymentGateway(httpFactory.CreateClient(), config.Payment, protector) :new DummyPaymentGateway();var result=await gateway.ConfirmAsync(paymentKey, orderId, amount);if(!result.Succeeded) return Results.Redirect($"/{slug}/checkout?error={Uri.EscapeDataString(result.Error ?? "결제 실패")}");using var db=dbFactory.Create(slug);var order=db.Orders .Include(o=> o.Lines) .FirstOrDefault(o=> o.OrderNo==orderId);if(order !=null) { order.Status="paid";order.TransactionId=result.TransactionId;DeductStock(db, order.Lines);await db.SaveChangesAsync();} return Results.Redirect($"/{slug}/order/{orderId}?paid=1");} | ) |
다음을 참조함 : app, ShopPlatform.Payments.IPaymentGateway.ConfirmAsync(), ShopPlatform.Data.TenantDbContextFactory.Create(), DeductStock(), ShopPlatform.Services.IShopTenantStore.GetAsync().

| app. MapRazorComponents< ShopPlatform.Components.App > | ( | ) |
다음을 참조함 : app.
|
static |
Program.cs 파일의 218 번째 라인에서 정의되었습니다.
| app. Run | ( | ) |
다음을 참조함 : app.
| await ShopPlatform.Data.ShopSeeder. SeedCodemaruAsync | ( | app.Services.GetRequiredService< TenantDbContextFactory > | (), |
| app.Services.GetRequiredService< IShopTenantStore > | (), | ||
| app.Services.GetRequiredService< PaymentKeyProtector > | () ) |
다음을 참조함 : app.
| app. UseAntiforgery | ( | ) |
다음을 참조함 : app.
| app. UseAuthentication | ( | ) |
다음을 참조함 : app.
| app. UseAuthorization | ( | ) |
다음을 참조함 : app.
| app. UseForwardedHeaders | ( | ) |
다음을 참조함 : app.
| app. UseMiddleware< OgBotMiddleware > | ( | ) |
다음을 참조함 : app.
| app. UseMiddleware< TenantMiddleware > | ( | ) |
다음을 참조함 : app.
| app. UseResponseCompression | ( | ) |
다음을 참조함 : app.
| app. UseStaticFiles | ( | ) |
다음을 참조함 : app.
| app. UseStaticFiles | ( | new StaticFileOptions { FileProvider=new Microsoft.Extensions.FileProviders.PhysicalFileProvider(shopOpts.ResolvedDataPath), RequestPath="/shop-img" } | ) |
| var app = builder.Build() |
Program.cs 파일의 52 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : if(), MapGet(), MapGet(), MapGet(), MapRazorComponents< ShopPlatform.Components.App >(), Run(), SeedCodemaruAsync(), UseAntiforgery(), UseAuthentication(), UseAuthorization(), UseForwardedHeaders(), UseMiddleware< OgBotMiddleware >(), UseMiddleware< TenantMiddleware >(), UseResponseCompression(), UseStaticFiles(), UseStaticFiles().
| AuthOptions authOptions |
Program.cs 파일의 18 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AddDreamineIdentityWeb().
| var builder = WebApplication.CreateBuilder(args) |
Program.cs 파일의 10 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AddDreamineIdentityWeb(), AddHttpClient(), AddRazorComponents(), AddResponseCompression(), AddScoped< CartService >(), AddScoped< ShopCustomerLoginSync >(), AddScoped< ShopCustomerSession >(), AddScoped< ShopUserContext >(), AddScoped< TenantContext >(), AddSingleton(), AddSingleton< IShopTenantStore, JsonShopTenantStore >(), AddSingleton< PaymentKeyProtector >(), AddSingleton< ShopCustomerProfileStore >(), AddSingleton< TenantDbContextFactory >(), AddUserSecrets().
| var shopOpts = ShopOptions.From(builder.Configuration) |
Program.cs 파일의 14 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AddSingleton(), UseStaticFiles().
| string usersDbPath |
Program.cs 파일의 20 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : AddDreamineIdentityWeb().
| var wwwroot = Path.Combine(app.Environment.ContentRootPath, "wwwroot") |
Program.cs 파일의 132 번째 라인에서 정의되었습니다.
다음에 의해서 참조됨 : EnsureDefault().