最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Using the Remoting Callbacks in .Net Applications
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
This code snippet shows invoking a method on the Remoting objects using the asynchronous design pattern. Clicking on the button Run/Abort the following code snippet is going to be perform:
private void buttonRM_Click(object sender, System.EventArgs e)
{
try
{
if(buttonRM.Text == "Run")
{
// client state
buttonRM.Text = "Busy";
progressBarStatus.Value = 0;
textBoxStatus.Text = string.Empty;
cb.State = true;
//
// arguments
int timeinsec = 10;
string ticketId = "ProgressBar";
RemoteCallback wire = new RemoteCallback(cb.Progress);
//
// invoking method on the objectA
AsyncCallback acbA = new AsyncCallback(asyncCallBackA);
DelegateGiveMeCallback dA = new DelegateGiveMeCallback(roA.GiveMeCallback);
IAsyncResult arA = dA.BeginInvoke(timeinsec, ticketId, wire, acbA, null);
//
// invoking method on the objectX
AsyncCallback acbX = new AsyncCallback(asyncCallBackX);
-
上一个: 第二部分,公共属性
-
下一个: 从服务器上获得网络时间的几种方法
相关文章
- .Net反向代理组件Yarp用法介绍 10-10
- .NET使用YARP通过编码方式配置域名转发实现反向代理教程 10-10
- .Net中Task Parallel Library的基本用法介绍 10-10
- .NET Core Dapper操作mysql数据库的实现教程 05-06
- 易语言给组件上加载图片方法步骤 12-26
- Asp.Net Core使用SignalR进行服务间调用方法示例 12-24