/// <summary> /// Default constructor. /// </summary> /// <param name="cname">Canonical name of participant. <seealso cref="RTP_Utils.GenerateCNAME"/>RTP_Utils.GenerateCNAME /// can be used to create this value.</param> /// <exception cref="ArgumentNullException">Is raised when <b>cname</b> is null reference.</exception> /// <exception cref="ArgumentException">Is raised when any of the arguments has invalid value.</exception> public RTP_MultimediaSession(string cname) { if (cname == null) { throw new ArgumentNullException("cname"); } if (cname == string.Empty) { throw new ArgumentException("Argument 'cname' value must be specified."); } m_pLocalParticipant = new RTP_Participant_Local(cname); m_pSessions = new List <RTP_Session>(); m_pParticipants = new Dictionary <string, RTP_Participant_Remote>(); }
/// <summary> /// Cleans up any resources being used. /// </summary> public void Dispose() { if (m_IsDisposed) { return; } foreach (RTP_Session session in m_pSessions.ToArray()) { session.Dispose(); } m_IsDisposed = true; m_pLocalParticipant = null; m_pSessions = null; m_pParticipants = null; NewParticipant = null; Error = null; }
/// <summary> /// Default constructor. /// </summary> /// <param name="cname">Canonical name of participant. <seealso cref="RTP_Utils.GenerateCNAME"/>RTP_Utils.GenerateCNAME /// can be used to create this value.</param> /// <exception cref="ArgumentNullException">Is raised when <b>cname</b> is null reference.</exception> /// <exception cref="ArgumentException">Is raised when any of the arguments has invalid value.</exception> public RTP_MultimediaSession(string cname) { if (cname == null) { throw new ArgumentNullException("cname"); } if (cname == string.Empty) { throw new ArgumentException("Argument 'cname' value must be specified."); } m_pLocalParticipant = new RTP_Participant_Local(cname); m_pSessions = new List<RTP_Session>(); m_pParticipants = new Dictionary<string, RTP_Participant_Remote>(); }