private static WaybillInteractionStateEnumDto MapToDto( this WaybillInteractionState model) { switch (model) { case WaybillInteractionState.None: return(WaybillInteractionStateEnumDto.None); case WaybillInteractionState.SentToMetazon: return(WaybillInteractionStateEnumDto.SentToMetazon); case WaybillInteractionState.MetazonValidationReceived: return(WaybillInteractionStateEnumDto.MetazonValidationReceived); case WaybillInteractionState.CancellationRequestSent: return(WaybillInteractionStateEnumDto.CancellationRequestSent); case WaybillInteractionState.CancellationResponseReceived: return(WaybillInteractionStateEnumDto.CancellationResponseReceived); default: throw new ArgumentOutOfRangeException( nameof(model), model, $"There are no corresponding {nameof(WaybillInteractionStateEnumDto)} " + $"for {nameof(WaybillInteractionState)}.{model.ToString()}."); } }