c# - WCF: How to stop myServiceHost.Close() from disposing of myServiceHost object? -
apparently close , dispose same. want able close , open servicehost instance without having reinstantiate everytime. ideas? thanks.
servicehost.close identical dispose()
. true, in general, types have close()
method - dispose()
implemented in terms of close()
.
fyi - servicehostbase
implements dispose()
explicitly via:
void idisposable.dispose() { base.close(); }
this, effectively, means when close servicehost, you'll dispose() of it. there no supported way "reopen" without recreating it.
Comments
Post a Comment