예제 #1
0
        private ITimeEntry getTimeEntry(NSDictionary dict)
        {
            if (dict == null)
            {
                return(null);
            }

            var id          = dict.GetLongForKey(timeEntryId).Value;
            var workspaceId = dict.GetLongForKey(timeEntryWorkspaceId).Value;
            var userId      = dict.GetLongForKey(timeEntryUserId).Value;

            var description = dict.GetStringForKey(timeEntryDescription);
            var startTime   = dict.GetDateTimeOffsetForKey(timeEntryStartTime).Value;
            var duration    = dict.GetLongForKey(timeEntryDuration);
            var isBillable  = dict.GetBoolForKey(timeEntryIsBillable).Value;

            var projectId       = dict.GetLongForKey(timeEntryProjectId);
            var taskId          = dict.GetLongForKey(timeEntryTaskId);
            var serverDeletedAt = dict.GetDateTimeOffsetForKey(timeEntryServerDeletedAt);
            var at = dict.GetDateTimeOffsetForKey(timeEntryAt).Value;

            return(new TimeEntry(
                       workspaceId,
                       projectId,
                       taskId,
                       isBillable,
                       startTime,
                       duration,
                       description,
                       null,
                       userId,
                       id,
                       serverDeletedAt,
                       at));
        }