public static FileFilteringServiceInvokerRequest CreateInstance(string fileName, Stream fileStream, int textScanLimit, string organizationId) { ArgumentValidator.ThrowIfNullOrEmpty("fileName", fileName); ArgumentValidator.ThrowIfInvalidValue <Stream>("fileStream", fileStream, (Stream stream) => stream != null || stream.Length > 0L); ArgumentValidator.ThrowIfNullOrEmpty("organizationId", organizationId); TimeSpan scanTimeout = FileFilteringServiceInvokerRequest.GetScanTimeout(fileStream); ContentManager contentManager = new ContentManager(Path.GetTempPath()); FileFipsDataStreamFilteringRequest fileFipsDataStreamFilteringRequest = FileFipsDataStreamFilteringRequest.CreateInstance(fileName, fileStream, contentManager); return(new FileFilteringServiceInvokerRequest(organizationId, scanTimeout, textScanLimit, fileFipsDataStreamFilteringRequest)); }
private FileFilteringServiceInvokerRequest(string organizationId, TimeSpan scanTimeout, int textScanLimit, FileFipsDataStreamFilteringRequest fileFipsDataStreamFilteringRequest) : base(organizationId, scanTimeout, textScanLimit, fileFipsDataStreamFilteringRequest) { this.contentManager = fileFipsDataStreamFilteringRequest.ContentManager; this.disposeTracker = this.GetDisposeTracker(); }