/// <summary> /// Initializes a new instance of the <see cref="DicomFileStoreParameters"/> class. /// </summary> /// <param name="update">The update.</param> /// <param name="getAcceptedTransferSyntaxes"> /// The function for getting the accepted transfer syntaxes when an association is made. /// </param> /// <param name="dicomSaver">The Dicom saver.</param> /// <exception cref="NullReferenceException"> /// Update or AcceptAssociation or ImageSaver /// </exception> public DicomFileStoreParameters( Action <Guid, DateTime, DicomAssociation, DicomReceiveProgressCode> update, Func <IReadOnlyDictionary <DicomUID, DicomTransferSyntax[]> > getAcceptedTransferSyntaxes, IDicomSaver dicomSaver) { Update = update ?? throw new ArgumentNullException(nameof(update), "The update action cannot be null."); GetAcceptedTransferSyntaxes = getAcceptedTransferSyntaxes ?? throw new ArgumentNullException(nameof(getAcceptedTransferSyntaxes), "The get accepted transfer syntaxes action cannot be null."); DicomSaver = dicomSaver ?? throw new ArgumentNullException(nameof(dicomSaver), "The DICOM saver cannot be null."); }
/// <summary> /// Construct a progress update for an ongoing Dicom C-Store request. /// </summary> /// <param name="dicomImageSaver">The image saver used for this progress event.</param> /// <param name="progressCode">The progress code.</param> /// <param name="socketConnectionDateTime">The date time the socket connection started.</param> /// <param name="dicomAssociation">The Dicom association.</param> /// <param name="associationId">The Dicom association identifier.</param> public DicomDataReceiverProgressEventArgs( IDicomSaver dicomSaver, DicomReceiveProgressCode progressCode, DateTime socketConnectionDateTime, DicomAssociation dicomAssociation, Guid associationId) { _dicomSaver = dicomSaver ?? throw new ArgumentNullException(nameof(dicomSaver)); ProgressCode = progressCode; SocketConnectionDateTime = socketConnectionDateTime; DicomAssociation = dicomAssociation; AssociationId = associationId; }
/// <summary> /// Constructor. This class is disposable. /// </summary> /// <param name="dicomImageSaver">The Dicom saver.</param> public ListenerDataReceiver(IDicomSaver dicomSaver) { _dicomSaver = dicomSaver; }