Пример #1
0
        public void ConnectCallback(System.IAsyncResult ar)
        {
            //prntSome.printSome("ConnectCallback");
            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);
            }
        }
Пример #2
0
 internal LazyAsyncResult(object myObject, object myState, System.AsyncCallback myCallBack)
 {
     m_AsyncObject = myObject;
     m_AsyncState = myState;
     m_AsyncCallback = myCallBack;
     m_Result = DBNull.Value;
 }
Пример #3
0
 internal LazyAsyncResult(object myObject, object myState, System.AsyncCallback myCallBack, object result)
 {
     m_AsyncObject = myObject;
     m_AsyncState = myState;
     m_AsyncCallback = myCallBack;
     m_Result = result;
     m_IntCompleted = 1;
     if (m_AsyncCallback != null)
         m_AsyncCallback(this);
 }
Пример #4
0
 System.IAsyncResult EZ_Travel.localService.IService1.BeginGetPath(int journeyID, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginGetPath(journeyID, callback, asyncState));
 }
Пример #5
0
 public System.IAsyncResult BeginLoadProperty(object entity, string propertyName, System.Data.Services.Client.DataServiceQueryContinuation continuation, System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #6
0
 public System.IAsyncResult BeginSaveChanges(System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #7
0
 public System.IAsyncResult BeginExecute <T>(System.Data.Services.Client.DataServiceQueryContinuation <T> continuation, System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #8
0
 public System.IAsyncResult BeginExecuteBatch(System.AsyncCallback callback, object state, params System.Data.Services.Client.DataServiceRequest[] queries)
 {
     throw null;
 }
Пример #9
0
 public System.IAsyncResult BeginSubmitEval(EvalServiceLibrary.Eval eval, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginSubmitEval(eval, callback, asyncState));
 }
Пример #10
0
 public System.IAsyncResult BeginGetEvals(System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginGetEvals(callback, asyncState));
 }
Пример #11
0
 System.IAsyncResult EZ_Travel.localService.IService1.BeginGetBusStop(int busID, double startLat, double startLong, double endLat, double endLong, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginGetBusStop(busID, startLat, startLong, endLat, endLong, callback, asyncState));
 }
Пример #12
0
 System.IAsyncResult HydroNumerics.Time.Web.TimeSeriesService.TimeSeriesService.BeginGetTime(System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginGetTime(callback, asyncState));
 }
Пример #13
0
 public System.IAsyncResult BeginretriveItinerary(string deviceID, int journeyID, System.AsyncCallback callback, object asyncState)
 {
     object[] _args = new object[2];
     _args[0] = deviceID;
     _args[1] = journeyID;
     System.IAsyncResult _result = base.BeginInvoke("retriveItinerary", _args, callback, asyncState);
     return(_result);
 }
Пример #14
0
 public System.IAsyncResult BeginGetLocation(System.AsyncCallback callback, object asyncState)
 {
     object[]            _args   = new object[0];
     System.IAsyncResult _result = base.BeginInvoke("GetLocation", _args, callback, asyncState);
     return(_result);
 }
Пример #15
0
 public System.IAsyncResult BeginGetBusStop(int busID, double startLat, double startLong, double endLat, double endLong, System.AsyncCallback callback, object asyncState)
 {
     object[] _args = new object[5];
     _args[0] = busID;
     _args[1] = startLat;
     _args[2] = startLong;
     _args[3] = endLat;
     _args[4] = endLong;
     System.IAsyncResult _result = base.BeginInvoke("GetBusStop", _args, callback, asyncState);
     return(_result);
 }
        IAsyncResult OnBeginByeOperation(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            ByeMessageApril2005 message = ((ByeMessageApril2005)(inValues[0]));

            return(this.BeginByeOperation(message, callback, asyncState));
        }
Пример #17
0
 private System.IAsyncResult OnBeginGetTime(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     return(((HydroNumerics.Time.Web.TimeSeriesService.TimeSeriesService)(this)).BeginGetTime(callback, asyncState));
 }
Пример #18
0
 public virtual System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #19
0
        private System.IAsyncResult OnBeginGetPath(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            int journeyID = ((int)(inValues[0]));

            return(((EZ_Travel.localService.IService1)(this)).BeginGetPath(journeyID, callback, asyncState));
        }
Пример #20
0
 private System.IAsyncResult OnBeginSubmitEval(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     EvalServiceLibrary.Eval eval = ((EvalServiceLibrary.Eval)(inValues[0]));
     return(this.BeginSubmitEval(eval, callback, asyncState));
 }
Пример #21
0
 System.IAsyncResult EZ_Travel.localService.IService1.BeginretrieveMarkerInfo(string jid, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginretrieveMarkerInfo(jid, callback, asyncState));
 }
Пример #22
0
 private System.IAsyncResult OnBeginGetEvals(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     return(this.BeginGetEvals(callback, asyncState));
 }
Пример #23
0
        private System.IAsyncResult OnBeginretrieveMarkerInfo(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            string jid = ((string)(inValues[0]));

            return(((EZ_Travel.localService.IService1)(this)).BeginretrieveMarkerInfo(jid, callback, asyncState));
        }
Пример #24
0
 public System.IAsyncResult BeginExecute <TElement>(System.Uri requestUri, System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #25
0
 System.IAsyncResult EZ_Travel.localService.IService1.BeginGetJourney(string from, string to, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginGetJourney(from, to, callback, asyncState));
 }
Пример #26
0
 public System.IAsyncResult BeginGetReadStream(object entity, System.Data.Services.Client.DataServiceRequestArgs args, System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #27
0
 System.IAsyncResult EZ_Travel.localService.IService1.BeginGetLocation(System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginGetLocation(callback, asyncState));
 }
Пример #28
0
 public System.IAsyncResult BeginLoadProperty(object entity, string propertyName, System.Uri nextLinkUri, System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #29
0
 private System.IAsyncResult OnBeginGetLocation(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     return(((EZ_Travel.localService.IService1)(this)).BeginGetLocation(callback, asyncState));
 }
Пример #30
0
 System.IAsyncResult EZ_Travel.localService.IService1.BeginretriveItinerary(string deviceID, int journeyID, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginretriveItinerary(deviceID, journeyID, callback, asyncState));
 }
Пример #31
0
 private System.IAsyncResult OnBeginOpen(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     return(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(callback, asyncState));
 }
        /// <summary>
        /// Inizializza il caricamento
        /// </summary>
        public override void Initialize()
        {
            if(loadGame)
            {
                LoadGameDelegate dlgt = new LoadGameDelegate(GameManager.LoadGame);
                System.AsyncCallback cb = new System.AsyncCallback(LoadGameComplete);
                System.IAsyncResult ar = dlgt.BeginInvoke(filePath, cb, dlgt);
            }

            else
            {

            #if WINDOWS
                NewGameDelegate dlgt = new NewGameDelegate(GameManager.NewGame);
                System.AsyncCallback cb = new System.AsyncCallback(NewGameComplete);
                System.IAsyncResult ar = dlgt.BeginInvoke(cb, dlgt);
            #endif
            #if WINDOWS_PHONE_APP
            Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(
               Windows.UI.Core.CoreDispatcherPriority.Normal,
               () => {
                   GameManager.NewGame();
                   isLoading = false;
              });
            #endif
            }
        }
Пример #33
0
 public virtual System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state)
 {
     throw null;
 }
Пример #34
0
        public void DispatchMessage(System.Object sender, string strText, System.Boolean b = false)
        {
            if (b)
            {
                //this.rdbDispatchMsg = strText;
                //prntSome.printSome(strText, "DispatchMessage", countdispatchrdb);
                //countdispatchrdb++;
            }
            if (this.XOFF == true)
            {
                // store the characters in the outputbuffer
                OutBuff += strText;
                return;
            }

            int i = 0;
            if (this.runOffline == false)
            {
                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);
                    }

                    System.IAsyncResult ar = this.CurSocket.BeginSend(
                        smk,
                        0,
                        smk.Length,
                        System.Net.Sockets.SocketFlags.None,
                        callbackEndDispatch,
                        this.CurSocket);

                }
                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);
                }
            }
        }
Пример #35
0
 private System.IAsyncResult OnBeginGetAllStudents(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     return(((TelerikSilverlightApp1.ServiceReference2.MyService)(this)).BeginGetAllStudents(callback, asyncState));
 }