/// <summary>
        /// <see cref="CustomSynchronizationContext"/> constructor
        /// </summary>
        /// <param name="supplier">Actual executor of the supplied actions</param>
        public CustomSynchronizationContext(ICustomSynchronizationContextSupplier supplier)
        {
            if (supplier == null)
            {
                throw new ArgumentNullException(nameof(supplier));
            }

            _supplier = supplier;
        }
示例#2
0
        /// <summary>
        /// Конструктор контекста синхронизации
        /// </summary>
        /// <param name="supplier">Объект-исполнитель действий</param>
        public CustomSynchronizationContext(ICustomSynchronizationContextSupplier supplier)
        {
            Contract.Requires(supplier != null);

            _supplier = supplier;
        }