/// <summary> /// Initializes a new instance of the <see cref="DicomResponse"/> class. /// </summary> /// <param name="request"> /// The request initiating the response. /// </param> /// <param name="status"> /// Response status. /// </param> protected DicomResponse(DicomRequest request, DicomStatus status) { PresentationContext = request.PresentationContext; Type = (DicomCommandField)(0x8000 | (int)request.Type); SOPClassUID = request.SOPClassUID; RequestMessageID = request.MessageID; Status = status; }
/// <summary> /// Initializes a new instance of the <see cref="DicomStatus"/> class. /// </summary> internal DicomStatus(ushort code, DicomStatus baseStatus) { // set the code given by param code... Code = code; // ... and copy all other values from baseStatus Description = baseStatus.Description; ErrorComment = baseStatus.ErrorComment; _mask = baseStatus._mask; State = baseStatus.State; }
/// <summary> /// Initializes a new instance of the <see cref="DicomNEventReportResponse"/> class. /// </summary> /// <param name="request"> /// The request associated with the N-EVENTREPORT response. /// </param> /// <param name="status"> /// The response status. /// </param> public DicomNEventReportResponse(DicomNEventReportRequest request, DicomStatus status) : base(request, status) { SOPInstanceUID = request.SOPInstanceUID; EventTypeID = request.EventTypeID; }
/// <summary> /// Initializes a new instance of the <see cref="DicomNActionResponse"/> class. /// </summary> /// <param name="request"> /// The associated N-ACTION request. /// </param> /// <param name="status"> /// The response status. /// </param> public DicomNActionResponse(DicomNActionRequest request, DicomStatus status) : base(request, status) { SOPInstanceUID = request.SOPInstanceUID; ActionTypeID = request.ActionTypeID; }
/// <summary> /// Initializes an instance of the <see cref="DicomCFindResponse"/> class. /// </summary> /// <param name="request">C-FIND request for which the response should be made.</param> /// <param name="status">Response status.</param> public DicomCFindResponse(DicomCFindRequest request, DicomStatus status) : base(request, status) { }
/// <summary> /// Initializes a new instance of the <see cref="DicomStatus"/> class. /// </summary> /// <param name="status">The status.</param> /// <param name="comment">The comment.</param> public DicomStatus(DicomStatus status, string comment) : this(string.Format("{0:x4}", status.Code), status.State, status.Description, comment) { }