public void handle(Sendable s) { EbXmlMessage ebxml = (EbXmlMessage)s; ITKDistributionEnvelopeAttachment a = (ITKDistributionEnvelopeAttachment)ebxml.Attachments[ITKATTACHMENT]; DistributionEnvelope d = a.DistributionEnvelope; IDistributionEnvelopeHandler h = null; try { h = handlers[d.getService()]; } catch (KeyNotFoundException) { EventLog logger = new EventLog("Application"); logger.Source = LOGSOURCE; StringBuilder sb = new StringBuilder("No explicit handler found for "); sb.Append(d.getService()); sb.Append(" using default DefaultFileSaveDistributionEnvelopeHandler instead"); logger.WriteEntry(sb.ToString(), EventLogEntryType.Warning); h = new DefaultFileSaveDistributionEnvelopeHandler(); } h.handle(d); }
public void handle(Sendable s) { EbXmlMessage ebxml = (EbXmlMessage)s; ITKDistributionEnvelopeAttachment a = (ITKDistributionEnvelopeAttachment)ebxml.Attachments[ITKATTACHMENT]; DistributionEnvelope d = a.DistributionEnvelope; IDistributionEnvelopeHandler h = null; try { h = handlers[d.getService()]; } catch (KeyNotFoundException) { EventLog logger = new EventLog("Application"); logger.Source = LOGSOURCE; StringBuilder sb = new StringBuilder("No explicit handler found for "); sb.Append(d.getService()); sb.Append(" using default DefaultFileSaveDistributionEnvelopeHandler instead"); logger.WriteEntry(sb.ToString(), EventLogEntryType.Warning); h = new DefaultFileSaveDistributionEnvelopeHandler(); } h.handle(d); }