Exemple #1
0
 public void ProcessChannels()
 {
     try
     {
         ChannelsServiceClient  client   = new ChannelsServiceClient();
         List <ChannelContract> channels = client.GetChannels().ToList();
         foreach (ChannelContract channel in channels)
         {
             try
             {
                 if (channel != null)
                 {
                     ChannelsProcessorFactory.Create(channel).Process();
                 }
             }
             catch (Exception e)
             {
                 // Сделать обработку ошибок
             }
         }
     }
     catch (Exception e)
     {
         // Сделать обработку ошибок
     }
 }
Exemple #2
0
        protected void SaveNewsItems()
        {
            ChannelsServiceClient client = new ChannelsServiceClient();

            client.AddNewsItems(NewsItems.ToArray());
        }