예제 #1
0
 /// <summary>
 /// Convenience method called internally by the constructors of this class
 /// to associate the given reportMechanism (or session's default) to the
 /// newly created message.
 ///
 /// MUST be called after a session is associated.
 /// </summary>
 /// <param name="reportMechanism"></param>
 protected void SetReportMechanism(ReportMechanism reportMechanism)
 {
     if (reportMechanism != null)
     {
         ReportMechanism = reportMechanism;
     }
     else if (Session != null)
     {
         ReportMechanism = Session.ReportMechanism;
     }
 }
예제 #2
0
 /// <summary>
 /// Constructor called internally when receiving an incoming message used by
 /// the IncomingMessage class
 /// </summary>
 /// <param name="session"></param>
 /// <param name="messageId"></param>
 /// <param name="contentType"></param>
 /// <param name="size">the size of the incoming message (should be bigger than -2
 ///                    and -1 for unknown (*) total size</param>
 /// <param name="reportMechanism"></param>
 public IncomingMessage(Session session, string messageId, string contentType, long size, ReportMechanism reportMechanism)
     : base(Direction.IN)
 {
     Session     = session;
     ContentType = contentType;
     MessageId   = messageId;
     SetReportMechanism(reportMechanism);
     Size = size;
 }