public static void InitializeGateWay(JObject file)
        {
            //Распарсить на объекты
            //Получаем все Destination
            foreach (var itemDestination in Destination.Parse.Destinations(file))
            {
                var destination = DestinationAPI.Add(itemDestination);
                if (destination == null)
                {
                    continue;
                }
                //Получаем все Source для данного Destination
                foreach (var itemSource in Source.Parse.Sources(itemDestination))
                {
                    var source = SourceAPI.Add(itemSource);
                    if (source == null)
                    {
                        continue;
                    }
                    //Получаем все Datum
                    foreach (var itemData in Datum.Parse.Data(itemSource))
                    {
                        var item = new Abstraction.Datum(source, destination, itemData);
                        destination.AddDatum(item);
                        source.AddDatum(item);
                    }
                }
            }

            //Инициализировать обработчик обработки данных
            DestinationAPI.InitHandlers();
        }
        //let another class handle the fetching of data, just provide the URI and let it do its thing
        public async Task <ViewResult> StatusReport()
        {
            var apiclient = new SourceAPI(endpoint);
            var list      = await apiclient.FetchAccountStatusReport <Account>();

            var mappedList = MapDto(list);

            return(View(mappedList));
        }
 public static void StartGateWay()
 {
     if (!_run)
     {
         //Запустить
         if (SourceAPI.Start())
         {
             if (DestinationAPI.Start())
             {
                 _run = true;
                 ProccessRun();
             }
         }
     }
 }