Ejemplo n.º 1
0
 public GlobalAppState(IConfiguration configuration)
 {
     Server = new Celin.AIS.Server(configuration["baseUrl"]);
     Server.AuthRequest.username = configuration["user"];
     Server.AuthRequest.password = configuration["password"];
     _ = Init();
 }
Ejemplo n.º 2
0
        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}");
            }
        }
Ejemplo n.º 3
0
 public DefCmd(IStore store, IMediator mediator, Celin.AIS.Server e1) : base(store, mediator, e1)
 {
 }
Ejemplo n.º 4
0
 public ABList(IStore store, IMediator mediator, Celin.AIS.Server e1) : base(store, mediator, e1)
 {
 }
Ejemplo n.º 5
0
 public BaseTextAttachmentCmd(IStore store, IMediator mediator, Celin.AIS.Server e1)
     : base(store, mediator, e1)
 {
 }
 public JdeAuthenticationStateProvider(E1Server e1Server, IMediator mediator)
 {
     Server   = e1Server;
     Mediator = mediator;
 }
Ejemplo n.º 7
0
 public LoadCmd(IStore store, Mediator mediator, Celin.AIS.Server e1)
     : base(store, mediator, e1)
 {
 }
Ejemplo n.º 8
0
 public Get(IStore store, IMediator mediator, Celin.AIS.Server e1, HttpClient http)
     : base(store, mediator, e1)
 {
     Http = http;
 }
Ejemplo n.º 9
0
 public Add(IStore store, IMediator mediator, Celin.AIS.Server server, HttpClient http)
     : base(store, mediator, server)
 {
     Http = http;
 }
Ejemplo n.º 10
0
 public BingMap(Celin.AIS.Server e1)
 {
     E1 = e1;
 }
Ejemplo n.º 11
0
 public E1Service(IConfiguration configuration)
 {
     _e1 = new Celin.AIS.Server(configuration["baseUrl"]);
     _e1.AuthRequest.username = configuration["user"];
     _e1.AuthRequest.password = configuration["password"];
 }