private void ParseDestinations(Dictionary <string, string> headers, DestinationType destinationType) { var items = mailNotificationModel .To .Where(t => t.DestinationType == destinationType) .ToList(); if (items.Count > 0) { foreach (Mail.Address item in items) { headers.Add(destinationType.ToString(), item.Email); } } }
private static NetAction.DestinationType translate(DestinationType destinationType) { switch (destinationType) { case DestinationType.QUEUE: return(NetAction.DestinationType.QUEUE); case DestinationType.TOPIC: return(NetAction.DestinationType.TOPIC); case DestinationType.VIRTUAL_QUEUE: return(NetAction.DestinationType.VIRTUAL_QUEUE); } throw new Exception("Unexpected DestinationType while unmarshalling message " + destinationType.ToString()); }
private static NetAction.DestinationType translate( DestinationType destinationType) { switch(destinationType) { case DestinationType.QUEUE: return NetAction.DestinationType.QUEUE; case DestinationType.TOPIC: return NetAction.DestinationType.TOPIC; case DestinationType.VIRTUAL_QUEUE: return NetAction.DestinationType.VIRTUAL_QUEUE; } throw new Exception("Unexpected DestinationType while unmarshalling message " + destinationType.ToString() ); }