Apparently Close and Dispose are effectively the same. I want to be able to Close and Open my ServiceHost instance without having to reinstantiate it everytime. Any ideas? Thanks.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
ServiceHost.Close is effectively identical to
Dispose()
. This is true, in general, with all types that have aClose()
method -Dispose()
is implemented in terms ofClose()
.FYI -
ServiceHostBase
implementsDispose()
explicitly via:This, effectively, means that when you close the ServiceHost, you'll always Dispose() of it. There is no supported way to "reopen" it without recreating it.