public ActionResult <List <ProductModel> > GetProducts() { //Tüm ürünleri getirme GetServices getServices = new GetServices(); return(getServices.getProducts()); }
/// <summary> /// GetServices /// </summary> /// <param name="filter"></param> /// <returns></returns> public XmlDocument GetServices(string filter) { GetServices services = NewServicesObject(filter); GenericXmlType data = _requestor.GetServices(services); return(GetXmlDoc(data)); }
/// <summary> /// Gets the available consul services /// </summary> public object Any(GetServices request) { var allServices = Discovery.GetServices(Discovery.Registration.Name); return(new GetServicesResponse { Services = allServices }); }
private GetServices NewServicesObject(string filter) { GetServices services = new GetServices(); services.securityToken = Authenticate(); services.serviceCategory = filter; return(services); }
public object Get(GetServices request) { var services = _liveTvManager.Services; var result = services.Select(GetServiceInfo) .ToList(); return(ToOptimizedResult(result)); }
/// <summary> /// Send the <paramref name="message"/> to the appropriate <see cref="ToolboxAction"/> for execution. /// </summary> /// <param name="message"></param> /// <param name="next"></param> /// <returns> /// True if the message was executed; otherwise, false. /// </returns> public override bool Queue(string message, Action <XenMessage> next = null) { _callback = next; var parsed = false; var executed = false; XenMessage xMessage = null; if (string.IsNullOrWhiteSpace(message)) { parsed = false; } else { parsed = XenMessage.TryParseFromAction(MessageFinder, message, out xMessage); } if (parsed) { var matches = Registrar.FindAll(r => r.Message.Name.Equals(xMessage.Action)); if (matches.Count == 0) { ExecuteNextMessage(xMessage); } foreach (var match in matches) { var action = Activator.CreateInstance(match.Action) as ToolboxAction; if (action == null) { continue; } GetServices?.Invoke(action); action.Execute(xMessage); executed = true; ExecuteNextMessage(xMessage); } } if (!executed) { Log.Warn("A received message was not dispatched."); } return(executed); }
/// <summary> /// Gets the available consul services /// </summary> public object Any(GetServices request) { var allServices = Discovery.GetServices(Discovery.Registration.Name); return new GetServicesResponse { Services = allServices }; }