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:
|
Build-TelegramBotBase:
|
||||||
env:
|
env:
|
||||||
APP_PROJECT_NAME: TelegramBotBase
|
APP_PROJECT_NAME: TelegramBotBase
|
||||||
PACKAGE_VERSION: "123.0.1"
|
PACKAGE_VERSION: "123.1.0"
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
|
|||||||
@ -302,17 +302,21 @@ public class SessionManager
|
|||||||
|
|
||||||
se.Values = ssea.Values;
|
se.Values = ssea.Values;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
//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);
|
|
||||||
|
//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);
|
states.Add(se);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user