예제 #1
0
 /** View for navigating somewhere */
 public nView View(string target, nContext context)
 {
     var rtn = View();
       rtn.Action = new nAction() {
     Id = target,
     Context = context
       };
       return rtn;
 }
예제 #2
0
        public ActualServices(ILogger <ActualServices> logger, IConfiguration config, IHttpClientFactory clientFactory, Rabbitmq rabbitmq)
        {
            _logger          = logger;
            _config          = config;
            _clientFactory   = clientFactory;
            _rabbitmq        = rabbitmq;
            _serviceRequests = new ConcurrentDictionary <HttpWebRequest, X509Certificate2>();

            DbContextOptionsBuilder <nContext> builder = new DbContextOptionsBuilder <nContext>();

            builder.UseNpgsql(_config["ConnectionStrings:pgConnection"]);
            context = new nContext(builder.Options);
        }
예제 #3
0
 /** View that returns data */
 public nView View(nModel model, nContext context)
 {
     var rtn = View();
       rtn.Model = model;
       return rtn;
 }
예제 #4
0
 /** Set the context the controller will need to use to create views */
 public void SetContext(nContext context)
 {
     _context = context;
 }