コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateService"/> class.
        /// </summary>
        /// <param name="configurationService">The configuration service.</param>
        public UpdateService(IConfigurationService configurationService)
        {
            Argument.IsNotNull(() => configurationService);

            _configurationService = configurationService;

            AvailableChannels = new UpdateChannel[] { };
        }
コード例 #2
0
ファイル: UpdateService.cs プロジェクト: llenroc/Orc.Squirrel
        /// <summary>
        /// Initializes a new instance of the <see cref="UpdateService"/> class.
        /// </summary>
        /// <param name="configurationService">The configuration service.</param>
        public UpdateService(IConfigurationService configurationService)
        {
            Argument.IsNotNull(() => configurationService);

            _configurationService = configurationService;

            AvailableChannels = new UpdateChannel[] { };
        }
コード例 #3
0
        public UpdateService(IConfigurationService configurationService, IFileService fileService,
                             IUpdateExecutableLocationService updateExecutableLocationService)
        {
            Argument.IsNotNull(() => configurationService);
            Argument.IsNotNull(() => fileService);
            Argument.IsNotNull(() => updateExecutableLocationService);

            _configurationService            = configurationService;
            _fileService                     = fileService;
            _updateExecutableLocationService = updateExecutableLocationService;

            AvailableChannels = new UpdateChannel[] { };
        }
コード例 #4
0
        /// <summary>
        /// Initializes this instance.
        /// </summary>
        /// <param name="availableChannels">The available channels.</param>
        /// <param name="defaultChannel">The default channel.</param>
        /// <param name="defaultCheckForUpdatesValue">The default value for the check for updates setting.</param>
        public void Initialize(IEnumerable <UpdateChannel> availableChannels, UpdateChannel defaultChannel, bool defaultCheckForUpdatesValue)
        {
            InitializeConfigurationKey(Settings.Application.AutomaticUpdates.CheckForUpdates, defaultCheckForUpdatesValue);
            InitializeConfigurationKey(Settings.Application.AutomaticUpdates.UpdateChannel, defaultChannel.Name);

            foreach (var channel in availableChannels)
            {
                InitializeConfigurationKey(Settings.Application.AutomaticUpdates.GetChannelSettingName(channel.Name), channel.DefaultUrl);
            }

            AvailableChannels = availableChannels.ToArray();

            _initialized = true;
        }
コード例 #5
0
ファイル: UpdateService.cs プロジェクト: llenroc/Orc.Squirrel
        /// <summary>
        /// Initializes this instance.
        /// </summary>
        /// <param name="availableChannels">The available channels.</param>
        /// <param name="defaultChannel">The default channel.</param>
        /// <param name="defaultCheckForUpdatesValue">The default value for the check for updates setting.</param>
        public void Initialize(IEnumerable<UpdateChannel> availableChannels, UpdateChannel defaultChannel, bool defaultCheckForUpdatesValue)
        {
            InitializeConfigurationKey(Settings.Application.AutomaticUpdates.CheckForUpdates, defaultCheckForUpdatesValue);
            InitializeConfigurationKey(Settings.Application.AutomaticUpdates.UpdateChannel, defaultChannel.Name);

            foreach (var channel in availableChannels)
            {
                InitializeConfigurationKey(Settings.Application.AutomaticUpdates.GetChannelSettingName(channel.Name), channel.DefaultUrl);
            }

            AvailableChannels = availableChannels.ToArray();

            _initialized = true;
        }