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); } }
// 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)); }
// 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)); }
public bool TryGetReconcileData(NamespacedName key, out ReconcileData data) { return(Namespace(key.Namespace).TryLookup(key, out data)); }
public ProductsController() { ReconcileData.Init(); }
public bool TryGetReconcileData(NamespacedName key, out ReconcileData data) { throw new NotImplementedException(); }