예제 #1
0
        public StateProfileDocument GetProfile(StateProfileDocument profile)
        {
            StateProfileDocument result = null;
            int agentId    = _agentProfileRepository.GetAgentId(profile.Agent);
            int activityId = _activityProfileRepository.GetActivityId(profile.Activity)[0];

            if (agentId != -1 && activityId != -1)
            {
                result = GetStateProfileDocument(agentId, activityId, profile.StateId, profile.Registration);
            }
            return(result);
        }
예제 #2
0
        public Activity GetActivity(Iri activityId)
        {
            int[]    index    = activityProfileRepository.GetActivityId(activityId);
            Activity activity = null;

            if (index[0] != -1)
            {
                activity = new Activity {
                    Id = activityId
                };
            }
            if (index[1] != -1)
            {
                var definition = GetActivityDefinition(index[1]);
                activity.Definition = definition;
            }
            return(activity);
        }