private static async Task <string> GetImageUrlAsync(
            string group,
            string image,
            IStaticService staticService,
            RegionEnum?region        = null,
            string dataDragonVersion = null)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }
            if (image == null)
            {
                throw new ArgumentNullException("image");
            }
            if (staticService == null)
            {
                throw new ArgumentNullException("staticService");
            }

            if (string.IsNullOrWhiteSpace(dataDragonVersion))
            {
                var realm = await staticService.GetRealmAsync(region);

                dataDragonVersion = realm.CurrentVersion;
            }

            return(string.Format("http://ddragon.leagueoflegends.com/cdn/{0}/img/{1}/{2}",
                                 dataDragonVersion,
                                 group,
                                 image));
        }
 public ServiceBrokerService(IServiceRepository serviceRepository, IDynamicService dynamicService,
                             ICachedService cachedService, IStaticService staticService, ITaskScheduler taskScheduler, ICache cache)
 {
     _serviceRepository = serviceRepository;
     _dynamicService    = dynamicService;
     _cachedService     = cachedService;
     _taskScheduler     = taskScheduler;
     _cache             = cache;
     _staticService     = staticService;
 }
Ejemplo n.º 3
0
        private void Dispose(bool pDispose)
        {
            if (_disposed)
            {
                return;
            }

            if (pDispose)
            {
                _authentificationService = null;
                _staticService           = null;
                UnsubscribeEvents();
            }

            _disposed = true;
        }
Ejemplo n.º 4
0
        internal ETLService(IAuthentificationService pAuthentificationService, IStaticService pStaticService, IEventService pEventService)
        {
            if (pAuthentificationService == null)
            {
                throw new ArgumentNullException("pAuthentificationService");
            }
            if (pStaticService == null)
            {
                throw new ArgumentNullException("pStaticService");
            }
            if (pEventService == null)
            {
                throw new ArgumentNullException("pEventService");
            }

            _authentificationService = pAuthentificationService;
            _staticService           = pStaticService;
            _eventService            = pEventService;
        }
Ejemplo n.º 5
0
 public StaticController(IStaticService staticService)
 {
     _staticService = staticService;
 }
        private static async Task<string> GetImageUrlAsync(
            string group,
            string image,
            IStaticService staticService,
            RegionEnum? region = null,
            string dataDragonVersion = null)
        {
            if (group == null) throw new ArgumentNullException("group");
            if (image == null) throw new ArgumentNullException("image");
            if (staticService == null) throw new ArgumentNullException("staticService");

            if (string.IsNullOrWhiteSpace(dataDragonVersion))
            {
                var realm = await staticService.GetRealmAsync(region);
                dataDragonVersion = realm.CurrentVersion;
            }

            return string.Format("http://ddragon.leagueoflegends.com/cdn/{0}/img/{1}/{2}",
                dataDragonVersion,
                group,
                image);
        }
Ejemplo n.º 7
0
 public StaticController(IStaticService srv)
 {
     this.srv = srv;
 }