Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
is it recommended when we add more number of language & CIty?
Really helpful !
Glad it was helpful!
When you refactored to use ENUMS, you forgot the factory pattern. You've should have instantiated EnglandFactory/SpainFactory on your provider.
You are right. I realized this and fixed in our Udemy course that is based on this video. Will have to update it here also.
I think we need to return the individual factories from the provider methods, and not the interfaces.
Like this right ?IInternationalFactory internationalFactory = InternationalProvider.CreateCountry(Country.England);ILanguage language = internationalFactory.CreateLanguage();ICapitalCity capitalCity = internationalFactory.CreateCapitalCity();
is it recommended when we add more number of language & CIty?
Really helpful !
Glad it was helpful!
When you refactored to use ENUMS, you forgot the factory pattern. You've should have instantiated EnglandFactory/SpainFactory on your provider.
You are right. I realized this and fixed in our Udemy course that is based on this video. Will have to update it here also.
I think we need to return the individual factories from the provider methods, and not the interfaces.
Like this right ?
IInternationalFactory internationalFactory = InternationalProvider.CreateCountry(Country.England);
ILanguage language = internationalFactory.CreateLanguage();
ICapitalCity capitalCity = internationalFactory.CreateCapitalCity();