Ejemplo n.º 1
0
 public GalleryEditorController(IOptions <StorageSettings> storageSettings, IGalleryRepository repo,
                                ITextAssetsRepository textRepo, ITechniqueRepository techniqueRepo)
 {
     _galleryRepo     = repo;
     _techniqueRepo   = techniqueRepo;
     _storageSettings = storageSettings;
     _textRepo        = textRepo;
     _storageFacade   = new StorageFacade(storageSettings);
     _factory         = new ArtPieceFactory(_galleryRepo, _textRepo, _techniqueRepo);
 }
Ejemplo n.º 2
0
        public IFactory CreateFactory(string type)
        {
            IFactory factory;

            if (type == PersonFactory)
            {
                factory = new PersonFactory();
            }
            else if (type == ExhibitionFactory)
            {
                factory = new ExhibitionFactory();
            }
            else if (type == ArtPieceFactory)
            {
                factory = new ArtPieceFactory();
            }
            else
            {
                factory = null;
            }
            return(factory);
        }