public void Procedure(Action action) { try { action(); _clientChannel.Close(); } catch (Exception ex) { KTrace.Error(ex); _clientChannel.Abort(); throw; } }
public T Function<T>(Func<T> func) { try { var result = func(); _clientChannel.Close(); return result; } catch (Exception ex) { KTrace.Error(ex); _clientChannel.Abort(); throw; } }