public void Run()
        {
            var allArticles = _feedDataClient.GetAllArticles();

            _feed = _feedService.GetFeed(allArticles);

            _feedFormatter = CreateFeedFormatter();

            _publishService.Publish(_feedFormatter);
        }
Ejemplo n.º 2
0
        public OperationReport PublishPropertyDefinition(PropertyDefinition propertyDef)
        {
            var operationReport = CanPublish(propertyDef);

            if (operationReport.Success)
            {
                return(publishService.Publish(propertyDef));
            }

            if (operationReport.ExceptionCount > 0)
            {
                throw operationReport.Exceptions.First();
            }

            return(operationReport);
        }
Ejemplo n.º 3
0
        public void Run()
        {
            Console.WriteLine("Publisher");
            Console.WriteLine("Please enter a name...");

            while (true)
            {
                var input = Console.ReadLine();

                if (input == "exit")
                {
                    break;
                }

                _publishService.Publish(new User
                {
                    FirstName    = input,
                    LastName     = "Johannes",
                    EmailAddress = "*****@*****.**"
                });
            }
        }
 public void Test1()
 {
     _publish.Publish <string>("yellow", $"test_{DateTime.Now.ToString()}");
 }