Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of <see cref="Whistle"/> with the given <see cref="WhistleOptions"/>.
        /// </summary>
        /// <param name="whistleOptions">Options that can be passed to <see cref="Whistle"/> to change its behaviour.</param>
        /// <param name="whistleOptionsValidator">Implementation of <see cref="IWhistleOptionsValidator"/></param>
        /// <param name="processStartInformationBuilder">Implementation of <see cref="IProcessStartInformationBuilder"/></param>
        internal Whistle(
            WhistleOptions whistleOptions,
            IWhistleOptionsValidator whistleOptionsValidator,
            IProcessStartInformationBuilder processStartInformationBuilder)
        {
            if (whistleOptionsValidator == null)
                throw new ArgumentNullException(nameof(whistleOptionsValidator));

            if (processStartInformationBuilder == null)
                throw new ArgumentNullException(nameof(processStartInformationBuilder));

            _whistleOptions = whistleOptions;
            _processStartInformationBuilder = processStartInformationBuilder;
            _whistleOptionsValidator = whistleOptionsValidator;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of <see cref="Whistle"/> with the given <see cref="WhistleOptions"/>.
        /// </summary>
        /// <param name="whistleOptions">Options that can be passed to <see cref="Whistle"/> to change its behaviour.</param>
        /// <param name="whistleOptionsValidator">Implementation of <see cref="IWhistleOptionsValidator"/></param>
        /// <param name="processStartInformationBuilder">Implementation of <see cref="IProcessStartInformationBuilder"/></param>
        internal Whistle(
            WhistleOptions whistleOptions,
            IWhistleOptionsValidator whistleOptionsValidator,
            IProcessStartInformationBuilder processStartInformationBuilder)
        {
            if (whistleOptionsValidator == null)
            {
                throw new ArgumentNullException(nameof(whistleOptionsValidator));
            }

            if (processStartInformationBuilder == null)
            {
                throw new ArgumentNullException(nameof(processStartInformationBuilder));
            }

            _whistleOptions = whistleOptions;
            _processStartInformationBuilder = processStartInformationBuilder;
            _whistleOptionsValidator        = whistleOptionsValidator;
        }