本文整理汇总了C#中ClearCanvas.Dicom.Network.DicomServer.Abort方法的典型用法代码示例。如果您正苦于以下问题:C# DicomServer.Abort方法的具体用法?C# DicomServer.Abort怎么用?C# DicomServer.Abort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ClearCanvas.Dicom.Network.DicomServer
的用法示例。
在下文中一共展示了DicomServer.Abort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnReceiveRequest
//.........这里部分代码省略.........
? instance.SendStatus.ToString()
: instance.ExtendedFailureDescription;
}
if (scu.RemainingSubOperations == 0)
{
foreach (StorageInstance sop in _theScu.StorageInstanceList)
{
if ((sop.SendStatus.Status != DicomState.Success)
&& (sop.SendStatus.Status != DicomState.Warning))
msg.DataSet[DicomTags.FailedSopInstanceUidList].AppendString(sop.SopInstanceUid);
}
if (scu.Status == ScuOperationStatus.Canceled)
status = DicomStatuses.Cancel;
else if (scu.Status == ScuOperationStatus.ConnectFailed)
status = DicomStatuses.QueryRetrieveMoveDestinationUnknown;
else if (scu.FailureSubOperations > 0)
status = DicomStatuses.QueryRetrieveSubOpsOneOrMoreFailures;
else if (!bOnline)
status = DicomStatuses.QueryRetrieveUnableToPerformSuboperations;
else
status = DicomStatuses.Success;
}
else
{
status = DicomStatuses.Pending;
if ((scu.RemainingSubOperations%5) != 0)
return;
// Only send a RSP every 5 to reduce network load
}
server.SendCMoveResponse(presentationId, message.MessageId,
msg, status,
(ushort) scu.SuccessSubOperations,
(ushort) scu.RemainingSubOperations,
(ushort) scu.FailureSubOperations,
(ushort) scu.WarningSubOperations,
status == DicomStatuses.QueryRetrieveSubOpsOneOrMoreFailures
? errorComment
: string.Empty);
if (scu.RemainingSubOperations == 0)
finalResponseSent = true;
};
_theScu.AssociationAccepted +=
(sender, parms) => AssociationAuditLogger.BeginInstancesTransferAuditLogger(
_theScu.StorageInstanceList,
parms);
_theScu.BeginSend(
delegate(IAsyncResult ar)
{
if (_theScu != null)
{
if (!finalResponseSent)
{
var msg = new DicomMessage();
server.SendCMoveResponse(presentationId, message.MessageId,
msg, DicomStatuses.QueryRetrieveSubOpsOneOrMoreFailures,
(ushort) _theScu.SuccessSubOperations,
0,
(ushort) (_theScu.FailureSubOperations + _theScu.RemainingSubOperations),
(ushort) _theScu.WarningSubOperations, errorComment);
finalResponseSent = true;
}
_theScu.EndSend(ar);
_theScu.Dispose();
_theScu = null;
}
},
_theScu);
return true;
} // end using()
}
catch (Exception e)
{
Platform.Log(LogLevel.Error,e,"Unexpected exception when processing C-MOVE-RQ");
if (finalResponseSent == false)
{
try
{
server.SendCMoveResponse(presentationId, message.MessageId, new DicomMessage(),
DicomStatuses.QueryRetrieveUnableToProcess, e.Message);
finalResponseSent = true;
}
catch (Exception x)
{
Platform.Log(LogLevel.Error, x,
"Unable to send final C-MOVE-RSP message on association from {0} to {1}",
association.CallingAE, association.CalledAE);
server.Abort();
}
}
}
return false;
}