Beispiel #1
0
        public bool TryLookup(NamespacedName key, out ReconcileData data)
        {
            var endspointsList = new List <Endpoints>();

            lock (_sync)
            {
                if (!_ingressData.TryGetValue(key.Name, out var ingress))
                {
                    ingress = default;
                }

                if (_ingressToServiceNames.TryGetValue(key.Name, out var serviceNames))
                {
                    foreach (var serviceName in serviceNames)
                    {
                        if (_endpointsData.TryGetValue(serviceName, out var serviceData))
                        {
                            endspointsList.Add(serviceData);
                        }
                    }
                }

                data = new ReconcileData(ingress, endspointsList);
                return(true);
            }
        }
Beispiel #2
0
        // GET: Invoices/Details/5
        public ActionResult Details(string id)
        {
            ReconcileData.Init();
            if (id == null)
            {
                return(BadRequest());
            }
            Invoice invoice = db.Invoices.Include(x => x.InvoiceEntries).ThenInclude(x => x.Product).FirstOrDefault(x => x.Number == int.Parse(id));

            if (invoice == null)
            {
                return(NotFound());
            }
            return(View(invoice));
        }
Beispiel #3
0
        // GET: Invoices/Details/5
        public ActionResult Details(string id)
        {
            ReconcileData.Init();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Invoice invoice = db.Invoices.Find(id);

            if (invoice == null)
            {
                return(HttpNotFound());
            }
            return(View(invoice));
        }
Beispiel #4
0
 public bool TryGetReconcileData(NamespacedName key, out ReconcileData data)
 {
     return(Namespace(key.Namespace).TryLookup(key, out data));
 }
 public ProductsController()
 {
     ReconcileData.Init();
 }
Beispiel #6
0
 public bool TryGetReconcileData(NamespacedName key, out ReconcileData data)
 {
     throw new NotImplementedException();
 }