public override async Task <Mapping> DeletePortMapAsync(Mapping mapping) { var message = new DeletePortMappingMessage(mapping, this); var response = await SendMessageAsync(message).ConfigureAwait(false); if (!(response is DeletePortMapResponseMessage)) { throw new MappingException(ErrorCode.Unknown, "Invalid response received when deleting the port map"); } return(mapping); }
/// <summary> /// Removes a port mapping from this computer /// </summary> public override IAsyncResult BeginDeletePortMap(Mapping mapping, AsyncCallback callback, object asyncState) { DeletePortMappingMessage message = new DeletePortMappingMessage(mapping, this); return(BeginMessageInternal(message, callback, asyncState, EndDeletePortMapInternal)); }