OutOfBandDataReceived() 공개 추상적인 메소드

public abstract OutOfBandDataReceived ( string data ) : void
data string
리턴 void
예제 #1
0
        private void ProcessOutput(string data)
        {
            switch (data[0])
            {
            case '*':                     // out of band data.
                if (currentCommand != null)
                {
                    currentCommand.OutOfBandDataReceived(data);
                }

                if (DebugMode)
                {
                    console.WriteLine("[Async Record] " + data);
                }

                ProcessAsynRecord(data);
                break;

            case '=':                     // notification record
                if (DebugMode)
                {
                    console.WriteLine("[Notification] " + data);
                }
                break;

            case '^':                     //this is for a response.
                if (DebugMode)
                {
                    console.WriteLine("[Response] " + data + Environment.NewLine);
                }

                if (currentCommand != null)
                {
                    response += data;

                    if (responseReceived.CurrentCount == 0)
                    {
                        responseReceived.Release();
                    }
                }
                else if (DebugMode)
                {
                    console.WriteLine("Current Command NULL");
                }
                break;

            case '&':
                if (data == "&\"Quit (expect signal SIGINT when the program is resumed)\\n\"")
                {
                    if (InternalStopped != null)
                    {
                        InternalStopped(this, null);
                    }
                }
                break;
            }
        }