Ejemplo n.º 1
0
        public ActionResult <List <ProductModel> > GetProducts()
        {
            //Tüm ürünleri getirme
            GetServices getServices = new GetServices();

            return(getServices.getProducts());
        }
Ejemplo n.º 2
0
        /// <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));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the available consul services
        /// </summary>
        public object Any(GetServices request)
        {
            var allServices = Discovery.GetServices(Discovery.Registration.Name);

            return(new GetServicesResponse {
                Services = allServices
            });
        }
Ejemplo n.º 4
0
        private GetServices NewServicesObject(string filter)
        {
            GetServices services = new GetServices();

            services.securityToken   = Authenticate();
            services.serviceCategory = filter;
            return(services);
        }
Ejemplo n.º 5
0
        public object Get(GetServices request)
        {
            var services = _liveTvManager.Services;

            var result = services.Select(GetServiceInfo)
                         .ToList();

            return(ToOptimizedResult(result));
        }
Ejemplo n.º 6
0
        /// <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 };
 }