public void Dispose() { if (GetCustomerCashPurseRequest != null) { GetCustomerCashPurseRequest.GetInvocationList().ToList().ForEach(x => GetCustomerCashPurseRequest -= (RequestEventHandler <ICustomerPurse>)x); } if (GetVendingMachineChangeRequest != null) { GetVendingMachineChangeRequest.GetInvocationList().ToList().ForEach(x => GetVendingMachineChangeRequest -= (RequestEventHandler <IVendingMachineChange>)x); } if (GetGoodsRequest != null) { GetGoodsRequest.GetInvocationList().ToList().ForEach(x => GetGoodsRequest -= (RequestEventHandler <IGoods>)x); } if (RefreshPutCoinBoxRequest != null) { RefreshPutCoinBoxRequest.GetInvocationList().ToList().ForEach(x => RefreshPutCoinBoxRequest -= (VoidEventHandler)x); } if (RefreshTemplatesRequest != null) { RefreshTemplatesRequest.GetInvocationList().ToList().ForEach(x => RefreshTemplatesRequest -= (VoidEventHandler <AccountType, CoinType>)x); } if (DisposeRequest != null) { DisposeRequest(); DisposeRequest.GetInvocationList().ToList().ForEach(x => DisposeRequest -= (VoidEventHandler)x); } }
protected ICustomerPurse GetCustomerCashPurse() { return(GetCustomerCashPurseRequest?.Invoke()); }