public UpdaterManagementService(ILoggerFactory loggerFactory, UpdaterManagementServiceConfiguration configuration) { _logger = loggerFactory.CreateLogger <UpdaterManagementService>(); _semaphore = new SemaphoreSlim(1, 1); _versionSource = configuration.VersionSource; _currentVersionDeterminer = configuration.CurrentVersionDeterminer; _applicationCloser = configuration.ApplicationCloser; _userInteractions = configuration.UserInteraction.ToArray(); _prepareSteps = configuration.UpdatePreparationSteps.ToArray(); _updaterCheckStrategy = configuration.CheckInterval.Accept(new SelectStrategyVisitor(this)); }
public Deck(IVersionSource versionSource) { VersionSource = versionSource; var cardList = new List<Card>(); foreach (var suit in Card.GetSuits()) { foreach (var number in Card.GetNumbers()) { for (var i = 0 ; i < cardCounts[number-1] ; i++) { cardList.Add(new Card(suit, number, versionSource)); } } } cards = cardList.ToArray(); Shuffle(cards); }
public Deck(IVersionSource versionSource) { VersionSource = versionSource; var cardList = new List <Card>(); foreach (var suit in Card.GetSuits()) { foreach (var number in Card.GetNumbers()) { for (var i = 0; i < cardCounts[number - 1]; i++) { cardList.Add(new Card(suit, number, versionSource)); } } } cards = cardList.ToArray(); Shuffle(cards); }
public DataUpdate(XmlElement xml, IVersionSource versions) : base(xml, versions) { }
public Card(Suit suit, int number, IVersionSource versionSource) { this.suit = suit; this.number = number; this.VersionSource = versionSource; }
public Updater(IVersionSource version_source, string data_folder) { this.Data = new DataUpdates(data_folder); this.Program = new ProgramUpdates(); this.VersionSource = version_source; }
public ProgramUpdate(XmlElement xml, IVersionSource source) : base(xml, source) { this.OS = xml.Attributes["os"].Value; }
//public UpdateBuilder ConfigureIntervalCheck() //{ // _configuration.CheckInterval = new UpdaterPeriodCheckIntervalConfiguration(); // return this; //} public UpdateBuilder UseSource(IVersionSource source) { _configuration.VersionSource = source; return(this); }