/// <summary> /// Sets the destination of a message. /// </summary> /// <param name="message">Message to set it's destination</param> /// <param name="destination">Destination to set to message</param> protected static void SetMessageDestination(MDSDataTransferMessage message, RoutingDestination destination) { //Sets destination server if (!string.IsNullOrEmpty(destination.Server)) { message.DestinationServerName = destination.Server.Equals("this", StringComparison.OrdinalIgnoreCase) ? MDSSettings.Instance.ThisServerName : destination.Server; } //Sets destination application if (!string.IsNullOrEmpty(destination.Application)) { message.DestinationApplicationName = destination.Application; } }