IFormState OR attributes
All checks were successful
build nuget workflow for TelegramBotBase project / Build-TelegramBotBase (x64, linux) (push) Successful in 38s
All checks were successful
build nuget workflow for TelegramBotBase project / Build-TelegramBotBase (x64, linux) (push) Successful in 38s
This commit is contained in:
parent
6a80ec66ad
commit
3f0fc962a4
@ -8,7 +8,7 @@ jobs:
|
||||
Build-TelegramBotBase:
|
||||
env:
|
||||
APP_PROJECT_NAME: TelegramBotBase
|
||||
PACKAGE_VERSION: "123.0.1"
|
||||
PACKAGE_VERSION: "123.1.0"
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
|
||||
@ -302,17 +302,21 @@ public class SessionManager
|
||||
|
||||
se.Values = ssea.Values;
|
||||
}
|
||||
|
||||
//Search for public properties with SaveState attribute
|
||||
var fields = form.GetType()
|
||||
.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
|
||||
.Where(a => a.GetCustomAttributes(typeof(SaveState), true).Length != 0).ToList();
|
||||
|
||||
foreach (var f in fields)
|
||||
else
|
||||
{
|
||||
var val = f.GetValue(form);
|
||||
|
||||
se.Values.Add("$" + f.Name, val);
|
||||
|
||||
//Search for public properties with SaveState attribute
|
||||
var fields = form.GetType()
|
||||
.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
|
||||
.Where(a => a.GetCustomAttributes(typeof(SaveState), true).Length != 0).ToList();
|
||||
|
||||
foreach (var f in fields)
|
||||
{
|
||||
var val = f.GetValue(form);
|
||||
|
||||
se.Values.Add("$" + f.Name, val);
|
||||
}
|
||||
}
|
||||
|
||||
states.Add(se);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user