-
-
Save ukaszjankowski/97bf49a70fdabf1d2e16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class KlasaKtoraTworzyKolejkeZadan : IKlasaKtoraTworzyKolejkeZadańBoIOneMogaByćRóżne { | |
public IZadanieA ZadanieA { private get; set; } | |
public IZadanieB ZadanieB { private get; set; } | |
public IZadanieC ZadanieC { private get; set; } | |
public IZadanieD ZadanieD { private get; set; } | |
public IZadanieE ZadanieE { private get; set; } | |
public List<IZadanie> Create(Options Options) | |
{ | |
var Result = new List<IZadanie>(); | |
if (<PiewrwszyCudownyWarunekNaPodstawieOptions>) | |
Result.Add(ZadanieA); | |
if (<Czterdziesty Warunek Na Podstawie Options i czerwonej plamy na Jowiszu>) | |
Result.Add(ZadanieB); | |
// I tych warunków niestety jest mnóstwo i móglbym je pogrupować, że każda klasa sprawdza tylko kilka i dorzucać | |
// na tej podstawie po kilka zadań, ale czy to ma sens takie sztuczne rozdzielanie? Chodzi mi o: | |
public IDyspozytorZadańZGrupyPierwszej DyspozytorZadańZGrupyPierwszej { private get; set; } | |
Results.AddRange(DyspozytorZadańZGrupyPierwszej.PobierzZadaniaNaPodstawieOpcji(Options)); | |
// Czy to jedyne rozwiazanie ? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment