Esempio n. 1
0
        static ImageProperties summonImage(Assembly assembly, string name, IImageRepository imageRepository)
        {
            if (!imageRepository.ContainsImage(name))
            {
                var imageLoader = ObjectFactory.GetInstance <ILoadImages>( );

                imageRepository.Set(new ImageProperties(
                                        name,
                                        imageLoader.LoadFromResource(assembly, name)));
            }

            return(imageRepository.GetByName(name));
        }
Esempio n. 2
0
        static ImageProperties summonImage(Assembly assembly, string name, IImageRepository imageRepository )
        {
            if( !imageRepository.ContainsImage( name ) )
            {
                var imageLoader = ObjectFactory.GetInstance<ILoadImages>( ) ;

                imageRepository.Set(new ImageProperties(
                    name,
                    imageLoader.LoadFromResource( assembly, name ) ) ) ;
            }

            return imageRepository.GetByName( name ) ;
        }
Esempio n. 3
0
 public async Task <bool> IsValidGetImageNews(IImageRepository repository, string city, DateTime date, Guid id)
 {
     return(await repository.ContainsImage(city, date, id));
 }