private void OnActLogged(ActLoggedEventArgs e) { if (Logged != null) { Logged(this, e); } }
void _activityService_Logged(object sender, ActLoggedEventArgs e) { var act = e.Act; var activity = _activityRepository.Get(act.ActivityId); var profile = _profileRepository.Get(act.ProfileId); profile.NewLevelAchieved += (o, i) => { ProfileNewLevelAchieved(o, new ProfileNewLevelAchievedEventArgs(o as Profile, act)); }; profile.ApplyPoints(activity.PointValue, new ProfileLevelService()); }