public GlobalAppState(IConfiguration configuration) { Server = new Celin.AIS.Server(configuration["baseUrl"]); Server.AuthRequest.username = configuration["user"]; Server.AuthRequest.password = configuration["password"]; _ = Init(); }
static void Main(string[] args) { try { IConfiguration config = new ConfigurationBuilder() .AddJsonFile("appsettings.json", false, true) .Build(); // Initialise the Logger var loggerFactory = LoggerFactory.Create(builder => { builder .SetMinimumLevel(LogLevel.Critical) .AddConsole(); }); ILogger logger = loggerFactory.CreateLogger <Program>(); var server = new Celin.AIS.Server(config["baseUrl"], logger); server.AuthRequest.username = "******"; server.AuthRequest.password = "******"; var services = new ServiceCollection() .AddLogging(config => { config .SetMinimumLevel(LogLevel.None) .AddConsole(); }) .AddScoped <Mediator>() .AddScoped <ILocalStorage, FileStorage>() .AddBlazorState ((options) => options.Assemblies = new Assembly[] { typeof(Program).GetTypeInfo().Assembly }) .AddScoped <POState>() .AddMediatR(typeof(POState)) .AddSingleton(server) .BuildServiceProvider(); var app = new CommandLineApplication <Cmd>(); app.Conventions .UseDefaultConventions() .UseConstructorInjection(services); app.Execute(args); } catch (Exception e) { Console.WriteLine($"ERROR: {e.Message}"); } }
public DefCmd(IStore store, IMediator mediator, Celin.AIS.Server e1) : base(store, mediator, e1) { }
public ABList(IStore store, IMediator mediator, Celin.AIS.Server e1) : base(store, mediator, e1) { }
public BaseTextAttachmentCmd(IStore store, IMediator mediator, Celin.AIS.Server e1) : base(store, mediator, e1) { }
public JdeAuthenticationStateProvider(E1Server e1Server, IMediator mediator) { Server = e1Server; Mediator = mediator; }
public LoadCmd(IStore store, Mediator mediator, Celin.AIS.Server e1) : base(store, mediator, e1) { }
public Get(IStore store, IMediator mediator, Celin.AIS.Server e1, HttpClient http) : base(store, mediator, e1) { Http = http; }
public Add(IStore store, IMediator mediator, Celin.AIS.Server server, HttpClient http) : base(store, mediator, server) { Http = http; }
public BingMap(Celin.AIS.Server e1) { E1 = e1; }
public E1Service(IConfiguration configuration) { _e1 = new Celin.AIS.Server(configuration["baseUrl"]); _e1.AuthRequest.username = configuration["user"]; _e1.AuthRequest.password = configuration["password"]; }