예제 #1
0
 public WorkoutPartWrapper(WorkoutWrapper parent, WorkoutPart element)
     : base(parent, element)
 {
 }
        private WorkoutPartWrapper GetWorkoutPartWrapper(WorkoutPart workoutPart, WorkoutWrapper parent)
        {
            WorkoutPartWrapper wrapper = null;

            // If we already have a wrapper for this workout, use it
            if (m_WorkoutPartWrapperMap.ContainsKey(workoutPart))
            {
                wrapper = m_WorkoutPartWrapperMap[workoutPart];
            }
            else
            {
                // Create a new wrapper
                wrapper = new WorkoutPartWrapper(parent, workoutPart);

                m_WorkoutPartWrapperMap[workoutPart] = wrapper;
            }

            return wrapper;
        }