private Dictionary <string, string> GetTokens(EmailViewModel vm) { _logger.LogInformation($"CreateInvitationHandler : GetTokens : ViewModel: {JsonConvert.SerializeObject(vm)}"); return(vm.GetType() .GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly) .ToDictionary(propertyInfo => propertyInfo.Name, propertyInfo => propertyInfo.GetValue(vm).ToString())); }
private Dictionary <string, string> GetTokens(EmailViewModel vm) { return(vm.GetType() .GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly) .ToDictionary(propertyInfo => propertyInfo.Name, propertyInfo => propertyInfo.GetValue(vm).ToString())); }