本文整理汇总了C#中IHttpClient.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# IHttpClient.Clone方法的具体用法?C# IHttpClient.Clone怎么用?C# IHttpClient.Clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IHttpClient
的用法示例。
在下文中一共展示了IHttpClient.Clone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetClient
private void SetClient(IHttpClient client)
{
this.mGetClient = (IHttpClient) client.Clone();
this.mCmdClient = (IHttpClient) client.Clone();
this.mGetClient.OnSent += new SentEventHandler(this.CallbackOnSent);
this.mGetClient.OnReceived += new ReceivedEventHandler(this.CallbackOnGetReceived);
this.mGetClient.OnNetworkError += new NetworkErrorEventHandler(this.CallbackOnError);
this.mCmdClient.OnSent += new SentEventHandler(this.CallbackOnSent);
this.mCmdClient.OnReceived += new ReceivedEventHandler(this.CallbackOnCmdReceived);
this.mCmdClient.OnNetworkError += new NetworkErrorEventHandler(this.CallbackOnError);
}
示例2: SendREP
public bool SendREP(IHttpClient client, int excutemode, string user, string password)
{
if (this.IsExcute)
{
return false;
}
this.mIsExcute = true;
this.mIsExcuteMode = excutemode;
this.mIsTTM = false;
this.Usersetting();
this.mHttpClient = (IHttpClient) client.Clone();
this.mUser = user;
this.mPass = password;
this.mHttpClient.OnSent += new SentEventHandler(this.CallbackOnSent);
this.mHttpClient.OnReceived += new ReceivedEventHandler(this.CallbackOnReceived);
this.mHttpClient.OnNetworkError += new NetworkErrorEventHandler(this.CallbackOnError);
this.SendTimerStart();
return true;
}
示例3: SendTTM
public bool SendTTM(IHttpClient client, string user, string password)
{
if (this.IsExcute)
{
return false;
}
this.mIsExcute = true;
this.mIsExcuteMode = 0;
this.mIsTTM = true;
this.Usersetting();
this.mHttpClient = (IHttpClient) client.Clone();
this.mUser = user;
this.mPass = password;
this.mHttpClient.OnSent += new SentEventHandler(this.CallbackOnSent);
this.mHttpClient.OnReceived += new ReceivedEventHandler(this.CallbackOnReceived);
this.mHttpClient.OnNetworkError += new NetworkErrorEventHandler(this.CallbackOnError);
this.txTerminal.Text = this.mTxTerminal;
this.txAccessKey.Text = this.mTxAccessKey;
this.ShowTimerStart();
return true;
}
示例4: ShowDialog
public DialogResult ShowDialog(IHttpClient client, string user, string password, bool post)
{
if (post)
{
this.Text = "管理資料再取り出し";
}
else
{
this.Text = "管理資料取り出し";
}
this.UserSetting();
this.mHttpClient = (IHttpClient) client.Clone();
this.mUser = user;
this.mPass = password;
this.mPost = post;
this.mHttpClient.OnSent += new SentEventHandler(this.CallbackOnSent);
this.mHttpClient.OnReceived += new ReceivedEventHandler(this.CallbackOnReceived);
this.mHttpClient.OnNetworkError += new NetworkErrorEventHandler(this.CallbackOnError);
return base.ShowDialog();
}