Пример #1
0
        /// <summary>
        /// Creates a new instance of <see cref="SaveScreenshotsToFileOnNext"/>
        /// </summary>
        /// <param name="directory">The directory where the screenshots will be saved</param>
        /// <param name="format">The format which the screenshots are saved</param>
        public SaveScreenshotsToFileOnNext(string directory, ScreenshotFormat format)
        {
            if (string.IsNullOrEmpty(directory))
            {
                throw new ArgumentNullException(nameof(directory));
            }

            Directory = directory;
            Format    = format ?? throw new ArgumentNullException(nameof(format));
        }
        /// <summary>
        /// Creates a new instance of <see cref="SaveScreenshotsToFileOnComplete"/>
        /// </summary>
        /// <param name="directory">The directory where the screenshots will be saved</param>
        /// <param name="format">The format which the screenshots are saved</param>
        public SaveScreenshotsToFileOnComplete(string directory, ScreenshotFormat format)
        {
            if (string.IsNullOrEmpty(directory))
            {
                throw new ArgumentNullException(nameof(directory));
            }

            screenshots = new List <ScreenshotInfo>();
            Directory   = directory;
            Format      = format ?? throw new ArgumentNullException(nameof(format));
        }
 /// <summary>
 /// Creates a new instance of <see cref="RenderedScreenshotInfoObserver"/>
 /// </summary>
 /// <param name="observer">The observer to render to</param>
 /// <param name="format">The format which the screenshots are saved</param>
 public RenderedScreenshotInfoObserver(IObserver <string> observer, ScreenshotFormat format)
 {
     this.Observer = observer ?? throw new ArgumentNullException(nameof(observer));
     Format        = format ?? throw new ArgumentNullException(nameof(format));
 }
Пример #4
0
 /// <summary>
 /// Creates a new instance of<see cref="ScreenshotInfoToActionAttachmentObserverAdapter"/>
 /// </summary>
 /// <param name="attachmentObserver"></param>
 /// <param name="format">The format which the screenshots are saved</param>
 public ScreenshotInfoToActionAttachmentObserverAdapter(IObserver <ActionFileAttachment> attachmentObserver, ScreenshotFormat format)
 {
     AttachmentObserver = attachmentObserver ?? throw new ArgumentNullException(nameof(attachmentObserver));
     Format             = format ?? throw new ArgumentNullException(nameof(format));
 }