DocSpace-buildtools/common/ASC.Common/Module/BaseWcfClient.cs

28 lines
550 B
C#
Raw Normal View History

namespace ASC.Common.Module;
2019-05-15 14:56:09 +00:00
public class BaseWcfClient<TService> : ClientBase<TService>, IDisposable where TService : class
2019-05-15 14:56:09 +00:00
{
public BaseWcfClient() { }
2019-05-15 14:56:09 +00:00
void IDisposable.Dispose()
{
// msdn recommendation to close wcf client
try
{
//Close();
}
catch (CommunicationException)
{
Abort();
}
catch (TimeoutException)
{
Abort();
}
catch (Exception)
2019-05-15 14:56:09 +00:00
{
Abort();
throw;
2019-05-15 14:56:09 +00:00
}
}
2022-02-03 14:18:58 +00:00
}