internal LazyAsyncResult(object myObject, object myState, System.AsyncCallback myCallBack) { this.m_AsyncObject = myObject; this.m_AsyncState = myState; this.m_AsyncCallback = myCallBack; this.m_Result = DBNull.Value; }
public UserControlSessionTree() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); _StorageSCUEmulatorFormAsyncCallback = new System.AsyncCallback(this.ResultsFromExecutingEmulatorStorageScuAsynchronously); _StorageSCUEmulatorForm = new StorageSCUEmulatorForm(_StorageSCUEmulatorFormAsyncCallback); }
public StorageSCUEmulatorForm(System.AsyncCallback theStorageScuAsyncCallback) { // // Required for Windows Form Designer support // InitializeComponent(); _StorageScuAsyncCallback = theStorageScuAsyncCallback; }
public VfsStreamAsync (Handle handle, byte[] buffer, int offset, int count, System.AsyncCallback cback, object state) { this.handle = handle; this.buffer = buffer; this.offset = offset; this.count = count; this.cback = cback; bytesRemaining = count; }
public SessionTreeViewManager(ProjectForm2 theParentForm, Project theProject, System.Windows.Forms.TreeView theSessionTreeView) { _ParentForm = theParentForm; _MainForm = (MainForm)_ParentForm._MainForm; _Project = theProject; _SessionTreeView = theSessionTreeView; _StorageSCUEmulatorFormAsyncCallback = new System.AsyncCallback(this.ResultsFromExecutingEmulatorStorageScuAsynchronously); _StorageSCUEmulatorForm = new StorageSCUEmulatorForm(_StorageSCUEmulatorFormAsyncCallback); }
internal LazyAsyncResult(object myObject, object myState, System.AsyncCallback myCallBack, object result) { this.m_AsyncObject = myObject; this.m_AsyncState = myState; this.m_AsyncCallback = myCallBack; this.m_Result = result; this.m_IntCompleted = 1; if (this.m_AsyncCallback != null) { this.m_AsyncCallback(this); } }
public UserControlSessionTree() { // This call is required by the Windows.Forms Form Designer. InitializeComponent(); // _MainForm = (MainForm)parentForm._MainForm; _StorageSCUEmulatorFormAsyncCallback = new System.AsyncCallback(this.ResultsFromExecutingEmulatorStorageScuAsynchronously); _StorageSCUEmulatorForm = new StorageSCUEmulatorForm(_StorageSCUEmulatorFormAsyncCallback); // _MainForm = (MainForm)parentForm._MainForm; // TODO: Add any initialization after the InitializeComponent call }
/// <summary> /// 客户端的消息收发对象 /// </summary> public LOClientSocket(string ip,int port) { //创建客户端Socket AddressFamily af = AddressFamily.InterNetwork; SocketType st = SocketType.Stream; ProtocolType pt = ProtocolType.Tcp; this.Client = new Socket (af, st, pt); //创建服务器节点 IPAddress ia = IPAddress.Parse (ip); IPEndPoint ep = new IPEndPoint (ia, port); //开始链接服务器节点 //1、服务器节点 //2、异步链接成功后的回调函数 System.AsyncCallback acb = new System.AsyncCallback(ClientConnectedToServer); //3、传递的参数 //开始链接服务器节点 this.Client.BeginConnect(ep,acb,this.Client); this.ByteBuffer = new byte[1024]; this.IP = ip; }
/// <remarks/> public System.IAsyncResult BeginSyncSubscriptionData(string ShortCode, string CommandCode, string UserID, string Message, string RequestID, string ServiceID, string RefID, string UpdateType, string UpdateDescription, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("SyncSubscriptionData", new object[] { ShortCode, CommandCode, UserID, Message, RequestID, ServiceID, RefID, UpdateType, UpdateDescription }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginUpdateReturnProductCard(string qcReturnNo, string serialNo, string userid, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("UpdateReturnProductCard", new object[] { qcReturnNo, serialNo, userid }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BegingetInfo(string[] PriceLists, string[] Attributes, string[] LanguageCodes, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("getInfo", new object[] { PriceLists, Attributes, LanguageCodes }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginUpdateLoadingSeal(string loadNo, string userid, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("UpdateLoadingSeal", new object[] { loadNo, userid }, callback, asyncState)); }
public System.IAsyncResult BeginGetDataUsingDataContract(ConsoleApp1.ServiceReference1.CompositeType composite, System.AsyncCallback callback, object asyncState) { return(base.Channel.BeginGetDataUsingDataContract(composite, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult Begindelete(string[] PriceLists, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("delete", new object[] { PriceLists }, callback, asyncState)); }
public System.IAsyncResult Beginget_policy_list(string [] webapp_names, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("get_policy_list", new object[] { webapp_names }, callback, asyncState)); }
public System.IAsyncResult BeginGetData(int value, System.AsyncCallback callback, object asyncState) { return(base.Channel.BeginGetData(value, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BegindestroySession(string sessionId, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("destroySession", new object[] { sessionId }, callback, asyncState)); }
public System.IAsyncResult Beginget_list(System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("get_list", new object[0], callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BegingetSessionRemainingLifeTime(string sessionId, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("getSessionRemainingLifeTime", new object[] { sessionId }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginchangeApplicationPassword(string sessionId, string oldPassword, string newPassword, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("changeApplicationPassword", new object[] { sessionId, oldPassword, newPassword }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BegingetToken(string pszXml, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("getToken", new object[] { pszXml }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginGetUpdatePC_FG_In(string serialNo, string userid, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("GetUpdatePC_FG_In", new object[] { serialNo, userid }, callback, asyncState)); }
public System.IAsyncResult Beginget_version(System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("get_version", new object[] { }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginGetQCReturnOrderInfo(string qcReturnNo, string userid, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("GetQCReturnOrderInfo", new object[] { qcReturnNo, userid }, callback, asyncState)); }
public System.IAsyncResult Beginreconfigure(string [] webapp_names, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("reconfigure", new object[] { webapp_names }, callback, asyncState)); }
private System.IAsyncResult OnBeginGetData(object[] inValues, System.AsyncCallback callback, object asyncState) { int value = ((int)(inValues[0])); return(this.BeginGetData(value, callback, asyncState)); }
public System.IAsyncResult Begindelete_all_disabled_webapps(System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("delete_all_disabled_webapps", new object[0], callback, asyncState)); }
private System.IAsyncResult OnBeginGetDataUsingDataContract(object[] inValues, System.AsyncCallback callback, object asyncState) { ConsoleApp1.ServiceReference1.CompositeType composite = ((ConsoleApp1.ServiceReference1.CompositeType)(inValues[0])); return(this.BeginGetDataUsingDataContract(composite, callback, asyncState)); }
public System.IAsyncResult Beginset_active_policy(string [] webapp_names, string [] policy_names, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("set_active_policy", new object[] { webapp_names, policy_names }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult Begincreate(TCreate_Input[] PriceLists, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("create", new object[] { PriceLists }, callback, asyncState)); }
public System.IAsyncResult Beginset_apply_learning(string [] webapp_names, ASMApplyLearning [] settings, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("set_apply_learning", new object[] { webapp_names, settings }, callback, asyncState)); }
public SocketListener() { AcceptCallback = new AsyncCallback(OnAcceptReceived); }
private void ConnectCallback(System.IAsyncResult ar) { try { // Get The connection socket from the callback System.Net.Sockets.Socket sock1 = (System.Net.Sockets.Socket) ar.AsyncState; if (sock1.Connected) { uc_CommsStateObject StateObject = new uc_CommsStateObject (); StateObject.Socket = sock1; // Assign Callback function to read from Asyncronous Socket callbackProc = new System.AsyncCallback (OnReceivedData); // Begin reading data asyncronously sock1.BeginReceive (StateObject.Buffer, 0, StateObject.Buffer.Length, System.Net.Sockets.SocketFlags.None, callbackProc, StateObject); } } catch (System.Exception CurException) { //System.Console.WriteLine ("ConnectCallback: " + CurException.Message); MessageBox.Show(CurException.Message); } }
/// <remarks/> public System.IAsyncResult BeginHelloWorld(System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("HelloWorld", new object[0], callback, asyncState)); }
/// <summary> /// 发送消息 /// </summary> /// <param name="message">Message.</param> public void SendMessage(string message,ClientSendDelegate block) { this.SendBlock = block; System.AsyncCallback iar = new System.AsyncCallback (SendCompleted); byte[] mb = Encoding.Default.GetBytes (message); this.Client.BeginSend (mb, 0, mb.Length, SocketFlags.None, iar,this.Client); }
///<summary> ///Updates the metainfo about the current song ///</summary> public void UpdateMetaInfo() { PerformUpdateMetaInfoDelegate SendDelegate = new PerformUpdateMetaInfoDelegate(this.PerformUpdateMetaInfo); System.AsyncCallback CallBack = new System.AsyncCallback(this.UpdateMetaInfoCallBack); SendDelegate.BeginInvoke(CallBack, null); }
internal AcceptorManager(ConnectMgr conparent) { m_ConMgrParent = conparent; AcceptCallback = new AsyncCallback(OnAcceptReceived); }
public System.IAsyncResult Beginset_language(string [] webapp_names, ASMWebApplicationLanguage [] languages, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("set_language", new object[] { webapp_names, languages }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginCheckValidationUser(string userid, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("CheckValidationUser", new object[] { userid }, callback, asyncState)); }
private void DispatchMessage(System.Object sender, string strText) { //Console.WriteLine(strText); if (this.XOFF == true) { // store the characters in the outputbuffer OutBuff += strText; return; } int i = 0; try { System.Byte[] smk = new System.Byte[strText.Length]; if (OutBuff != "") { strText = OutBuff + strText; OutBuff = ""; } for (i=0; i < strText.Length ; i++) { System.Byte ss = System.Convert.ToByte (strText[i]); smk[i] = ss ; } if (callbackEndDispatch == null) { callbackEndDispatch = new System.AsyncCallback (EndDispatchMessage); } if (this.CurSocket == null) { try { reader._pf.Transmit(smk); } catch { MessageBox.Show("error communicating with socket"); } } else { try { System.IAsyncResult ar = this.CurSocket.BeginSend ( smk, 0, smk.Length, System.Net.Sockets.SocketFlags.None, callbackEndDispatch, this.CurSocket); } catch { MessageBox.Show("error communicating with socket"); } } } catch (System.Exception CurException) { //System.Console.WriteLine ("DispatchMessage: " + CurException.Message); //System.Console.WriteLine ("DispatchMessage: Character is " + System.Convert.ToInt32 (strText[i])); //System.Console.WriteLine ("DispatchMessage: String is " + strText); MessageBox.Show("DispatchMessage: " + CurException.Message); MessageBox.Show("DispatchMessage: Character is " + System.Convert.ToInt32 (strText[i])); MessageBox.Show("DispatchMessage: String is " + strText); } }
public void StartServer(ServerAcceptDelegate block) { this.accept_block = block; //开始侦听链接请求 this.socket.Listen(this.backlog); //接受客户端请求... //创建委托类型的回调函数变量 System.AsyncCallback acb = new System.AsyncCallback(ServerAccept); //开始等待接受客户端请求 this.socket.BeginAccept(acb,this.socket); this.client_list = new List<LOClientSocket> (); }
/// <summary> /// Creates connection to server. /// </summary> public virtual void Connect() { // Change Connection status. this.ConnectionStatusChange(this, new FmdcEventArgs(Connecting)); first = true; if (Protocol == null) throw new NullReferenceException("Protocol is null, You need to set Protocol before trying to connect."); try { // Establish Connection socket = new Socket(remoteAddress.AddressFamily , SocketType.Stream , ProtocolType.Tcp); // It is needed so we know when we have a connection. allDone.Reset(); socket.Blocking = false; System.AsyncCallback onconnect = new System.AsyncCallback(OnConnect); socket.BeginConnect(remoteAddress, onconnect, socket); // Waits until we have a connection... allDone.WaitOne(); } catch (System.Exception e2) { // Change Connection Status this.ConnectionStatusChange(this, new FmdcEventArgs(Disconnected, e2)); return; } }
public System.IAsyncResult Begindelete_webapp(string [] webapp_names, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("delete_webapp", new object[] { webapp_names }, callback, asyncState)); }
public System.IAsyncResult Beginset_language_extended_template_names(string [] webapp_names, ASMWebApplicationLanguage [] languages, string [] policy_names, string [] policy_template_names, long timeout, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("set_language_extended_template_names", new object[] { webapp_names, languages, policy_names, policy_template_names, timeout }, callback, asyncState)); }
/// <remarks/> public System.IAsyncResult BeginGetProductCardStatus(string serialNo, string userid, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("GetProductCardStatus", new object[] { serialNo, userid }, callback, asyncState)); }
public TestAsyncResult(System.AsyncCallback callback, object state, TimeSpan latency) { IsCompleted = false; _callback = callback; _state = state; _waitHandle = new ManualResetEvent(false); _timer = new Timer(onTimer => NotifyComplete(), null, latency, TimeSpan.FromMilliseconds(-1)); }
public System.IAsyncResult Beginset_logging_profile(string [] webapp_names, string [] logprof_names, System.AsyncCallback callback, object asyncState) { return(this.BeginInvoke("set_logging_profile", new object[] { webapp_names, logprof_names }, callback, asyncState)); }