/// <summary>Creates an instance for the default language.</summary> /// <returns>A repository.</returns> public IContinentRepository ForDefaultCulture() { var size2DConverter = new Size2DConverter(); var continentConverter = new ContinentConverter(size2DConverter); var continentCollectionConverter = new ContinentCollectionConverter(continentConverter); return new ContinentRepository(this.serviceClient, continentCollectionConverter); }
/// <summary>Creates an instance for the default language.</summary> /// <returns>A repository.</returns> public IContinentRepository ForDefaultCulture() { var size2DConverter = new Size2DConverter(); var continentConverter = new ContinentConverter(size2DConverter); var continentCollectionConverter = new ContinentCollectionConverter(continentConverter); return(new ContinentRepository(this.serviceClient, continentCollectionConverter)); }
/// <summary>Creates an instance for the default language.</summary> /// <returns>A repository.</returns> public override IContinentRepository ForDefaultCulture() { var continentConverter = new ContinentConverter(); var identifiersConverter = new ResponseConverter <ICollection <int>, ICollection <int> >(new ConverterAdapter <ICollection <int> >()); var responseConverter = new ResponseConverter <ContinentDTO, Continent>(continentConverter); var pageResponseConverter = new CollectionPageResponseConverter <ContinentDTO, Continent>(continentConverter); var bulkResponseConverter = new DictionaryRangeResponseConverter <ContinentDTO, int, Continent>(continentConverter, cont => cont.ContinentId); return(new ContinentRepository(this.serviceClient, identifiersConverter, responseConverter, bulkResponseConverter, pageResponseConverter)); }
/// <summary>Creates an instance for the given language.</summary> /// <param name="culture">The culture.</param> /// <returns>A repository.</returns> public IContinentRepository ForCulture(CultureInfo culture) { var size2DConverter = new Size2DConverter(); var continentConverter = new ContinentConverter(size2DConverter); var continentCollectionConverter = new ContinentCollectionConverter(continentConverter); IContinentRepository repository = new ContinentRepository(this.serviceClient, continentCollectionConverter); repository.Culture = culture; return(repository); }
/// <summary>Creates an instance for the given language.</summary> /// <param name="culture">The culture.</param> /// <exception cref="ArgumentNullException">The value of <paramref name="culture"/> is a null reference.</exception> /// <returns>A repository.</returns> public override IContinentRepository ForCulture(CultureInfo culture) { if (culture == null) { throw new ArgumentNullException("culture"); } var continentConverter = new ContinentConverter(); var identifiersConverter = new ResponseConverter <ICollection <int>, ICollection <int> >(new ConverterAdapter <ICollection <int> >()); var responseConverter = new ResponseConverter <ContinentDTO, Continent>(continentConverter); var pageResponseConverter = new CollectionPageResponseConverter <ContinentDTO, Continent>(continentConverter); var bulkResponseConverter = new DictionaryRangeResponseConverter <ContinentDTO, int, Continent>(continentConverter, cont => cont.ContinentId); IContinentRepository repository = new ContinentRepository(this.serviceClient, identifiersConverter, responseConverter, bulkResponseConverter, pageResponseConverter); repository.Culture = culture; return(repository); }
/// <summary>Creates an instance for the given language.</summary> /// <param name="culture">The culture.</param> /// <returns>A repository.</returns> public IContinentRepository ForCulture(CultureInfo culture) { var size2DConverter = new Size2DConverter(); var continentConverter = new ContinentConverter(size2DConverter); var continentCollectionConverter = new ContinentCollectionConverter(continentConverter); IContinentRepository repository = new ContinentRepository(this.serviceClient, continentCollectionConverter); repository.Culture = culture; return repository; }