/// <summary>Creates an instance for the default language.</summary> /// <returns>A repository.</returns> public IColorRepository ForDefaultCulture() { var colorConverter = new ColorConverter(); var colorModelConverter = new ColorModelConverter(colorConverter); var colorPaletteConverter = new ColorPaletteConverter(colorConverter, colorModelConverter); var colorPaletteCollectionConverter = new ColorPaletteCollectionConverter(colorPaletteConverter); return new ColorRepository(this.serviceClient, colorPaletteCollectionConverter); }
/// <summary>Creates an instance for the default language.</summary> /// <returns>A repository.</returns> public IColorRepository ForDefaultCulture() { var colorConverter = new ColorConverter(); var colorModelConverter = new ColorModelConverter(colorConverter); var colorPaletteConverter = new ColorPaletteConverter(colorConverter, colorModelConverter); var colorPaletteCollectionConverter = new ColorPaletteCollectionConverter(colorPaletteConverter); return(new ColorRepository(this.serviceClient, colorPaletteCollectionConverter)); }
/// <summary>Creates an instance for the given language.</summary> /// <param name="culture">The culture.</param> /// <returns>A repository.</returns> public IColorRepository ForCulture(CultureInfo culture) { var colorConverter = new ColorConverter(); var colorModelConverter = new ColorModelConverter(colorConverter); var colorPaletteConverter = new ColorPaletteConverter(colorConverter, colorModelConverter); var colorPaletteCollectionConverter = new ColorPaletteCollectionConverter(colorPaletteConverter); IColorRepository repository = new ColorRepository(this.serviceClient, colorPaletteCollectionConverter); repository.Culture = culture; return(repository); }
/// <summary>Creates an instance for the default language.</summary> /// <returns>A repository.</returns> public override IColorRepository ForDefaultCulture() { var colorConverter = new ColorConverter(); var colorModelConverter = new ColorModelConverter(colorConverter); var colorPaletteConverter = new ColorPaletteConverter(colorConverter, colorModelConverter); var identifiersResponseConverter = new ResponseConverter <ICollection <int>, ICollection <int> >(new ConverterAdapter <ICollection <int> >()); var responseConverter = new ResponseConverter <ColorPaletteDTO, ColorPalette>(colorPaletteConverter); var bulkResponseConverter = new DictionaryRangeResponseConverter <ColorPaletteDTO, int, ColorPalette>(colorPaletteConverter, color => color.ColorId); var pageResponseConverter = new CollectionPageResponseConverter <ColorPaletteDTO, ColorPalette>(colorPaletteConverter); return(new ColorRepository(this.serviceClient, identifiersResponseConverter, responseConverter, bulkResponseConverter, pageResponseConverter)); }
/// <summary>Creates an instance for the given language.</summary> /// <param name="culture">The culture.</param> /// <returns>A repository.</returns> public IColorRepository ForCulture(CultureInfo culture) { var colorConverter = new ColorConverter(); var colorModelConverter = new ColorModelConverter(colorConverter); var colorPaletteConverter = new ColorPaletteConverter(colorConverter, colorModelConverter); var colorPaletteCollectionConverter = new ColorPaletteCollectionConverter(colorPaletteConverter); IColorRepository repository = new ColorRepository(this.serviceClient, colorPaletteCollectionConverter); repository.Culture = culture; return repository; }
public ColorPaletteConverterTests() { this.colorConverterMock = new ColorConverterMock(); this.colorModelConverterMock = new ColorModelConverterMock(); this.colorPaletteConverter = new ColorPaletteConverter(this.colorConverterMock, this.colorModelConverterMock); }