コード例 #1
0
ファイル: Presence.cs プロジェクト: lcmxiaoya/xmpp-source
 public Presence(S22.Xmpp.Core.Presence presence) : base(null, null, null, null, new XmlElement[0])
 {
     presence.ThrowIfNull <S22.Xmpp.Core.Presence>("presence");
     this.type    = this.ParseType(presence.Data.GetAttribute("type"));
     base.element = presence.Data;
 }
コード例 #2
0
		/// <summary>
		/// Initializes a new instance of the PresenceEventArgs class.
		/// </summary>
		/// <param name="stanza">The Presence stanza on whose behalf the event is
		/// raised.</param>
		/// <exception cref="ArgumentNullException">The stanza parameter is
		/// null.</exception>
		public PresenceEventArgs(Presence stanza) {
			stanza.ThrowIfNull("stanza");
			Stanza = stanza;
		}
コード例 #3
0
ファイル: XmppCore.cs プロジェクト: BlueBasher/S22.Xmpp
		/// <summary>
		/// Sends the specified presence stanza to the server.
		/// </summary>
		/// <param name="presence">The presence stanza to send to the server.</param>
		/// <exception cref="ArgumentNullException">The presence parameter
		/// is null.</exception>
		/// <exception cref="ObjectDisposedException">The XmppCore object has been
		/// disposed.</exception>
		/// <exception cref="InvalidOperationException">The XmppCore instance is not
		/// connected to a remote host.</exception>
		/// <exception cref="IOException">There was a failure while writing to the
		/// network.</exception>
		public void SendPresence(Presence presence) {
			AssertValid();
			presence.ThrowIfNull("presence");
			Send(presence);
		}