コード例 #1
0
            private static async Task AddUserAndBikeIdsToIssue(ReportedIssue issue)
            {
                if (Settings.UserId == 0)
                {
                    throw new InvalidOperationException("UserId is not saved");
                }

                if (Settings.CurrentBookingId == 0)
                {
                    throw new InvalidOperationException("CurrentBookingId is not saved");
                }
                var currentBooking = await RidesService.GetBooking(Settings.CurrentBookingId);

                issue.BikeId = currentBooking.BikeId;
                issue.UserId = Settings.UserId;
            }