public static UserActivity ga_LogEntry(this UserActivity userActivity) { if (userActivity.notNull()) { var title = "[UserActivity] [{0}]".format(userActivity.Who); var page = "{0}: {1}".format(userActivity.Action, userActivity.Detail); title.ga_LogEntry(page); } return(userActivity); }
/*public static UserActivity logUserActivity (this UserActivities userActivities, string who, string action, string detail) * { * var userActivity = userActivities.newUserActivity(who,action,detail); * return userActivities.logUserActivity(userActivity, null); * } */ public static UserActivity logUserActivity(this UserActivities userActivities, UserActivity userActivity, TMUser tmUser) { if (userActivities.notNull() && userActivity.notNull()) { userActivities.ActivitiesLog.Add(userActivity); userActivity.firebase_Log(); if (tmUser.notNull() && tmUser.ID != Guid.Empty) { tmUser.UserActivities.Add(userActivity); tmUser.saveTmUser(); } } return(userActivity); }
/*public static UserActivity logUserActivity (this UserActivities userActivities, string who, string action, string detail) { var userActivity = userActivities.newUserActivity(who,action,detail); return userActivities.logUserActivity(userActivity, null); } */ public static UserActivity logUserActivity(this UserActivities userActivities, UserActivity userActivity, TMUser tmUser) { if (userActivities.notNull() && userActivity.notNull()) { if(userActivities.logging_Enabled()) { userActivities.ActivitiesLog.add_Activity(userActivity); userActivity.firebase_Log(); if (tmUser.notNull() && tmUser.ID != Guid.Empty) { tmUser.UserActivities.add_Activity(userActivity); tmUser.event_User_Updated(); //tmUser.saveTmUser(); } } } return userActivity; }
/*public static UserActivity logUserActivity (this UserActivities userActivities, string who, string action, string detail) * { * var userActivity = userActivities.newUserActivity(who,action,detail); * return userActivities.logUserActivity(userActivity, null); * } */ public static UserActivity logUserActivity(this UserActivities userActivities, UserActivity userActivity, TMUser tmUser) { if (userActivities.notNull() && userActivity.notNull()) { if (userActivities.logging_Enabled()) { userActivities.ActivitiesLog.add_Activity(userActivity); userActivity.firebase_Log(); if (tmUser.notNull() && tmUser.ID != Guid.Empty) { tmUser.UserActivities.add_Activity(userActivity); tmUser.event_User_Updated(); //tmUser.saveTmUser(); } } } return(userActivity); }