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); } }
public void Dispose() { if (UpdatePutCoinBoxRequest != null) { UpdatePutCoinBoxRequest.GetInvocationList().ToList().ForEach(x => UpdatePutCoinBoxRequest -= (VoidEventHandler)x); } if (UpdateTemplatesRequest != null) { UpdateTemplatesRequest.GetInvocationList().ToList().ForEach(x => UpdateTemplatesRequest -= (VoidEventHandler <AccountType, CoinType>)x); } if (DisposeRequest != null) { DisposeRequest(); DisposeRequest.GetInvocationList().ToList().ForEach(x => DisposeRequest -= (VoidEventHandler)x); } }