HeapShot.Reader.ObjectMapReader.ForceSnapshot C# (CSharp) 메소드

ForceSnapshot() 공개 메소드

public ForceSnapshot ( ) : void
리턴 void
        public void ForceSnapshot()
        {
            if (header == null) {
                Read ();
                if (header == null)
                    throw new Exception ("Log file could not be opened");
            }
            using (TcpClient client = new TcpClient ()) {
                client.Connect ("127.0.0.1", header.Port);
                using (StreamWriter sw = new StreamWriter (client.GetStream ())) {
                    sw.WriteLine ("heapshot");
                    sw.Flush ();
                }
            }
        }