本文整理汇总了C#中IqType类的典型用法代码示例。如果您正苦于以下问题:C# IqType类的具体用法?C# IqType怎么用?C# IqType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IqType类属于命名空间,在下文中一共展示了IqType类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IQ
public IQ(IqType type, Jid from, Jid to)
: this()
{
this.Type = type;
this.From = from;
this.To = to;
}
示例2: AvatarIq
public AvatarIq(IqType type) : this()
{
this.Type = type;
}
示例3: PrivacyIq
public PrivacyIq(IqType type, Jid to)
: this(type)
{
To = to;
}
示例4: PrivateIq
public PrivateIq(IqType type, Jid to, Jid from)
: this(type, to)
{
this.From = from;
}
示例5: IqRequestAsync
/// <summary>
/// Performs an IQ set/get request asynchronously and optionally invokes a
/// callback method when the IQ response comes in.
/// </summary>
/// <param name="type">The type of the request. This must be either
/// IqType.Set or IqType.Get.</param>
/// <param name="to">The JID of the intended recipient for the stanza.</param>
/// <param name="from">The JID of the sender.</param>
/// <param name="data">he content of the stanza.</param>
/// <param name="language">The language of the XML character data of
/// the stanza.</param>
/// <param name="callback">A callback method which is invoked once the
/// IQ response from the server comes in.</param>
/// <returns>The ID value of the pending IQ stanza request.</returns>
/// <exception cref="ArgumentException">The type parameter is not IqType.Set
/// or IqType.Get.</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 string IqRequestAsync(IqType type, Jid to = null, Jid from = null,
XmlElement data = null, CultureInfo language = null,
Action<string, Iq> callback = null) {
AssertValid();
return IqRequestAsync(new Iq(type, null, to, from, data, language), callback);
}
示例6: VersionIq
public VersionIq(IqType type, Jid to, Jid from)
: this(type, to)
{
this.From = from;
}
示例7: StorageIq
public StorageIq(IqType type, Jid to, Jid from)
: this(type, to)
{
this.From = from;
}
示例8: AuthIq
public AuthIq(IqType type, Jid to, Jid from)
: this(type, to)
{
this.From = from;
}
示例9: BrowseIq
public BrowseIq(IqType type, Jid to) : this(type)
{
To = to;
}
示例10: PubSubIq
public PubSubIq(IqType type)
: this()
{
this.Type = type;
}
示例11: IqRequest
/// <summary>
/// Performs an IQ set/get request and blocks until the response IQ comes in.
/// </summary>
/// <param name="type">The type of the request. This must be either
/// IqType.Set or IqType.Get.</param>
/// <param name="to">The JID of the intended recipient for the stanza.</param>
/// <param name="from">The JID of the sender.</param>
/// <param name="data">he content of the stanza.</param>
/// <param name="language">The language of the XML character data of
/// the stanza.</param>
/// <param name="millisecondsTimeout">The number of milliseconds to wait
/// for the arrival of the IQ response or -1 to wait indefinitely.</param>
/// <returns>The IQ response sent by the server.</returns>
/// <exception cref="ArgumentException">The type parameter is not
/// IqType.Set or IqType.Get.</exception>
/// <exception cref="ArgumentOutOfRangeException">The value of millisecondsTimeout
/// is a negative number other than -1, which represents an indefinite
/// timeout.</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, or there was a failure reading from the network.</exception>
/// <exception cref="TimeoutException">A timeout was specified and it
/// expired.</exception>
public Iq IqRequest(IqType type, Jid to = null, Jid from = null,
XmlElement data = null, CultureInfo language = null,
int millisecondsTimeout = -1) {
AssertValid();
return IqRequest(new Iq(type, null, to, from, data, language), millisecondsTimeout);
}
示例12: IqResponse
/// <summary>
/// Sends an IQ response for the IQ request with the specified id.
/// </summary>
/// <param name="type">The type of the response. This must be either
/// IqType.Result or IqType.Error.</param>
/// <param name="id">The id of the IQ request.</param>
/// <param name="to">The JID of the intended recipient for the stanza.</param>
/// <param name="from">The JID of the sender.</param>
/// <param name="data">he content of the stanza.</param>
/// <param name="language">The language of the XML character data of
/// the stanza.</param>
/// <exception cref="ArgumentException">The type parameter is not IqType.Result
/// or IqType.Error.</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 IqResponse(IqType type, string id, Jid to = null, Jid from = null,
XmlElement data = null, CultureInfo language = null) {
AssertValid();
IqResponse(new Iq(type, id, to, from, data, null));
}
示例13: FeatureNegIq
public FeatureNegIq(IqType type)
: this()
{
this.Type = type;
}
示例14: BindIq
public BindIq(IqType type)
: this()
{
Type = type;
}