public AbstractService() { ConfigurableServiceHost host = OperationContext.Current.Host as ConfigurableServiceHost; if (host == null) { throw new ArithmeticException("Cannot find ConfigurableServiceHost in current operation context."); } _server = host.Tag as FormSOAPServer; if (_server == null) { throw new ArithmeticException("Cannot find FormSOAPServer in current operation context."); } }
private void buttonServer_Click(object sender, EventArgs e) { FormSOAPServer frm = new FormSOAPServer(); frm.ShowDialog(); }