예제 #1
0
        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()));
        }
예제 #2
0
 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()));
 }