Пример #1
0
        public IActivity CreateActivity(ActivityTypes activityType, string id, decimal cost)
        {
            //activity type cant be null

            IActivity activity = null;

            if (activityTable.ContainsKey(activityType))
            {
                activity = (Activity)activityTable[activityType];
            }
            else
            {
                throw new ArgumentException("Activity does not exist. Has it been registered?");
            }

            return(activity.CreateActivity(id, cost));
        }