public void StopMsysSocket() { var pagent = agent as PageantAgent; if (pagent == null) return; pagent.StopMsysSocket(); }