public ProtocolForResultsConfiguration(string path, SingleViewConfiguration <ProtocolForResultsPayload> view)
        {
            if (path == null)
            {
                throw new ArgumentNullException(nameof(path));
            }

            if (path.Trim().Length == 0 && !path.Equals(string.Empty))
            {
                throw new ArgumentException("Path cannot consist of whitespace only");
            }

            Path = path;
            View = view ?? throw new ArgumentNullException(nameof(view));
        }
 public ShareTargetConfiguration(IEnumerable <string> fileTypes, SingleViewConfiguration <ShareTargetPayload> view, int priority)
     : this(StandardDataFormats.StorageItems, fileTypes, view, priority)
 {
 }
        private ShareTargetConfiguration(string dataFormat, IEnumerable <string> fileTypes, SingleViewConfiguration <ShareTargetPayload> view, int priority)
        {
            if (string.IsNullOrWhiteSpace(dataFormat))
            {
                throw new ArgumentException("Data Format cannot be null, empty, or whitespace", nameof(dataFormat));
            }

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

            if (dataFormat != StandardDataFormats.StorageItems && fileTypes.Any())
            {
                throw new ArgumentException("Only the StorageItems Data Format can have supported file types");
            }

            DataFormat = dataFormat;
            FileTypes  = new ReadOnlyCollection <string>(fileTypes.ToList());
            View       = view ?? throw new ArgumentNullException(nameof(view));
            Priority   = priority;
        }
 public ShareTargetConfiguration(string dataFormat, SingleViewConfiguration <ShareTargetPayload> view, int priority)
     : this(dataFormat, Enumerable.Empty <string>(), view, priority)
 {
 }