Files
moadiran/TaxPayerFull/Program.cs

58 lines
1.7 KiB
C#
Raw Normal View History

2024-03-29 17:44:38 +03:30
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Front;
2024-03-30 15:10:36 +03:30
using System.Globalization;
2024-04-18 00:33:46 +03:30
using Shared.DTOs;
2024-04-18 18:26:12 +03:30
using Front.Services;
using System.ComponentModel.Design;
2024-03-29 17:44:38 +03:30
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
2024-04-16 13:15:51 +03:30
builder.Services.AddBlazorBootstrap();
2024-04-18 18:26:12 +03:30
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
builder.Services.AddScoped<localService>();
2024-04-29 07:58:41 +03:30
builder.Services.AddScoped<HttpClientController>();
2024-05-17 23:05:46 +03:30
builder.Services.AddScoped<Fixedvalues>();
2024-04-30 16:40:05 +03:30
builder.Services.AddScoped(sp => new UserAuthenticationDTO()
{
Company = new CompanyAuthenticationDTO()
{
ID = 0,
IsAdmin = false,
Logo = "",
Name = ""
2024-08-28 00:29:35 +03:30
},
2024-04-30 16:40:05 +03:30
FullName = "",
Photo="",
Token="",
UserName = "",
enterDate =new DateTime(),
exitDate = new DateTime(),
}) ;
2024-04-16 13:15:51 +03:30
2024-06-30 19:57:32 +03:30
// Server
2024-10-16 16:35:38 +03:30
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
2025-01-09 18:35:24 +03:30
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("https://moadiran.ir:444/api/") });
2024-03-29 17:44:38 +03:30
2024-06-30 19:57:32 +03:30
//Home
2025-01-09 18:35:24 +03:30
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
2024-04-02 17:14:18 +03:30
2024-06-30 19:57:32 +03:30
//farzan
2024-10-16 23:36:52 +03:30
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
2024-03-30 15:10:36 +03:30
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fa-Ir");
2024-03-29 17:44:38 +03:30
2024-04-18 18:26:12 +03:30
var host = builder.Build();
await new MidLevel(
host.Services.GetRequiredService<ILocalStorageService>(),
host.Services.GetRequiredService<UserAuthenticationDTO>(),
host.Services.GetRequiredService<HttpClient>()
).InitAsync();
await host.RunAsync();
2024-03-31 01:33:17 +03:30