Example #1
0
        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));
        }
Example #2
0
 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);
 }
Example #3
0
        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);
        }
Example #4
0
 public DataUpdate(XmlElement xml, IVersionSource versions)
     : base(xml, versions) {
 }
Example #5
0
 public Card(Suit suit, int number, IVersionSource versionSource)
 {
     this.suit = suit;
      this.number = number;
      this.VersionSource = versionSource;
 }
Example #6
0
 public Updater(IVersionSource version_source, string data_folder) {
     this.Data = new DataUpdates(data_folder);
     this.Program = new ProgramUpdates();
     this.VersionSource = version_source;
 }
Example #7
0
 public Card(Suit suit, int number, IVersionSource versionSource)
 {
     this.suit          = suit;
     this.number        = number;
     this.VersionSource = versionSource;
 }
        public ProgramUpdate(XmlElement xml, IVersionSource source)
            : base(xml, source) {
            this.OS = xml.Attributes["os"].Value;

        }
Example #9
0
        //public UpdateBuilder ConfigureIntervalCheck()
        //{
        //    _configuration.CheckInterval = new UpdaterPeriodCheckIntervalConfiguration();
        //    return this;
        //}

        public UpdateBuilder UseSource(IVersionSource source)
        {
            _configuration.VersionSource = source;
            return(this);
        }