in src/main/csharp/MessageProducer.cs [49:81]
public MessageProducer(Session sess, IDestination dest)
{
if(null == sess
|| null == sess.Connection
|| null == sess.Connection.Context)
{
throw new NMSConnectionException();
}
Destination theDest = dest as Destination;
if(null == theDest)
{
throw new InvalidDestinationException("Consumer cannot receive on Null Destinations.");
}
else if(null == theDest.Name)
{
throw new InvalidDestinationException("The destination object was not given a physical name.");
}
else if(theDest.IsTemporary)
{
String physicalName = theDest.Name;
if(String.IsNullOrEmpty(physicalName))
{
throw new InvalidDestinationException("Physical name of Destination should be valid: " + theDest);
}
}
this.session = sess;
this.destination = theDest;
this.destination.InitSender();
}