public static void LogEvent(LogType type, MessageDirection messageDirection, string description, DicomCommandType command, DicomDataSet dataset, StoreScu Client, SerializableDictionary <string, object> customInformation) { try { string ae = Client.AETitle; DicomNet net = Client as DicomNet; SerializableDictionary <string, object> logCustomInformation = DicomLogEntry.CustomInformationDicomMessage; if (customInformation != null) { logCustomInformation = new SerializableDictionary <string, object>(); foreach (KeyValuePair <string, object> kvp in customInformation) { logCustomInformation.Add(kvp.Key, kvp.Value); } logCustomInformation.Add(DicomLogEntry.DicomMessageKey, DicomLogEntry.DicomMessageValue); } Logger.Global.Log("Auto Copy", Client.CurrentScp.AETitle, Client.CurrentScp.PeerAddress.ToString(), Client.CurrentScp.Port, net.IsAssociated() ? net.Association.Calling : ae, net.HostAddress != null ? net.HostAddress.ToString() : string.Empty, net.IsConnected() ? net.HostPort : -1, command, DateTime.Now, type, messageDirection, description, dataset, logCustomInformation); } catch (Exception exception) { Logger.Global.Exception("Auto Copy", exception); } }
public static void Log ( DicomNet client, DicomCommandType command, LogType logType, MessageDirection direction, DicomDataSet dataSet, string description ) { Log(client.IsAssociated( ) ? client.Association.Calling : string.Empty, client.HostAddress, client.HostPort, command, logType, direction, dataSet, description); }