// Returns user information, or the type of user if not a known user. static string getUserInfo(Google.Apis.DriveActivity.v2.Data.User user) { if (user.KnownUser != null) { KnownUser knownUser = user.KnownUser; bool isMe = knownUser.IsCurrentUser ?? false; return(isMe ? "people/me" : knownUser.PersonName); } return(getOneOf(user)); }
// Returns user information, or the type of user if not a known user. private static string GetUserInfo(User user) { if (user.KnownUser != null) { KnownUser knownUser = user.KnownUser; bool isMe = knownUser.IsCurrentUser ?? false; return(isMe ? "people/me" : knownUser.PersonName); } return(GetOneOf(user)); }