3
我編寫此接口來創建和終止會話。WCF:如何檢測會話超時?
[ServiceContract(SessionMode = SessionMode.Required)]
public interface IOrdersService
{
[OperationContract(IsInitiating = true, IsTerminating = false)]
void EmptyCart();
[OperationContract(IsInitiating = false,IsTerminating = false)]
void AddToCart(CartItem cartItem);
}
它`做工精細。但是,當會話超時,那麼我如何檢測?