문제

I am hosting my WCF Services in a Managed Application.
I use ServiceHost class for this.

Regarding the class I am hosting inside the ServiceHost, should implement IDispoable ? When it will be called if i implemented :IDisposable ?
When i call servicehost.Close() ?

도움이 되었습니까?

해결책

The main reason to implement IDisposable is if your class wraps an unmanaged resource.

Whether this is inside ServiceHost has no bearing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top