private void StartAlternateAeTitleListener(ServerPartition part, ServerPartitionAlternateAeTitle alternateAe) { var context = new DicomScpContext(part) { AlternateAeTitle = alternateAe }; if (DicomSettings.Default.ListenIPV4) { var ipV4Scp = new DicomScp <DicomScpContext>(context, AssociationVerifier.Verify, AssociationAuditLogger.InstancesTransferredAuditLogger) { ListenPort = alternateAe.Port, AeTitle = alternateAe.AeTitle, ListenAddress = IPAddress.Any }; StartScp(ipV4Scp, _alternateAeListenerList); } if (DicomSettings.Default.ListenIPV6) { var ipV6Scp = new DicomScp <DicomScpContext>(context, AssociationVerifier.Verify, AssociationAuditLogger.InstancesTransferredAuditLogger) { ListenPort = alternateAe.Port, AeTitle = alternateAe.AeTitle, ListenAddress = IPAddress.IPv6Any }; StartScp(ipV6Scp, _alternateAeListenerList); } }
private bool IsChanged(ServerPartitionAlternateAeTitle p2) { if (_alternateAeTitles.ContainsKey(p2.AeTitle)) { ServerPartitionAlternateAeTitle p1 = _alternateAeTitles[p2.AeTitle]; if (p1.Port != p2.Port) { return(true); } if (p1.AllowKOPR != p2.AllowKOPR) { return(true); } if (p1.AllowQuery != p2.AllowQuery) { return(true); } if (p1.AllowRetrieve != p2.AllowRetrieve) { return(true); } if (p1.Enabled != p2.Enabled) { return(true); } if (!p1.ServerPartitionKey.Key.Equals(p2.ServerPartitionKey.Key)) { return(true); } // nothing has changed return(false); } // this is new ServerPartitionAlternateAeTitle return(true); }
/// <summary> /// Creates an instance of <see cref="SopInstanceImporterContext"/> to be used /// by <see cref="SopInstanceImporter"/> /// </summary> /// <param name="id"></param> /// <param name="sourceAe">Source AE title where the image(s) are imported from</param> /// <param name="serverAe">Target AE title where the image(s) will be imported to</param> public SopInstanceImporterContext(string id, string sourceAe, string serverAe) : this(id, sourceAe, ServerPartitionMonitor.Instance.GetPartition(serverAe)) { _alternateAe = ServerPartitionMonitor.Instance.GetPartitionAlternateAe(serverAe); }