QER.Customizer/QER.Customizer/Person.cs
Compact public source page. The previous oversized rendered HTML was archived outside the public site; this page keeps source-derived context plus a bounded excerpt for browsing/search.
original 1.63 MBcompact pageexcerpt 2 lines
Source-derived context
classes Person, MP, _003C_003Ec__DisplayClass11_0, _003C_003Ec__DisplayClass11_1; methods _003C_LoadShoppingCartPattern_003Eb__0, _003C_LoadShoppingCartPattern_003Eb__1, _003C_LoadShoppingCartPattern_003Eb__3, _003C_LoadShoppingCartPattern_003Eb__2, _003C_UpdateShoppingCartPattern_003Eb__0, _003C_UpdateShoppingCartPattern_003Eb__1; references AccProduct, AERole, Delegation, DialogColumn, DialogGroup, DialogParameter; markers reads entity values, writes entity values, saves entities, references DB/Dialog objects, IT Shop related markers, Job/process related markers
Bounded excerpt
First lines from the rendered source block, bounded to keep the public page fast.
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Data;5using System.Data.Common;6using System.Diagnostics;7using System.Globalization;8using System.Linq;9using System.Runtime.CompilerServices;10using System.Runtime.InteropServices;11using System.Security;12using System.Security.Principal;13using System.Text.RegularExpressions;14using System.Threading;15using System.Threading.Tasks;16using VI.Base;17using VI.Base.Encryption;18using VI.DB;19using VI.DB.Auth;20using VI.DB.DataAccess;21using VI.DB.Entities;22using VI.DB.MetaData;23using VI.DB.Passwords;24using VI.DB.Sync;2526namespace QER.Customizer;2728public class Person : StateBasedEntityLogic29{30 private class MP31 {32 public string? PassCodeword;3334 public string? NewPassword;35 }3637 [CompilerGenerated]38 private sealed class _003C_003Ec__DisplayClass11_039 {40 public IEntity entity;4142 public string uidShoppingCartPattern;4344 internal ExpressionClause _003C_LoadShoppingCartPattern_003Eb__0(IExpressionContext c)45 {46 return c.Column("UID_PersonInserted") == entity.GetValue<string>("UID_Person") && c.Column("IsActivated") == true;47 }4849 internal ExpressionClause _003C_LoadShoppingCartPattern_003Eb__1(IExpressionContext c)50 {51 return c.Column("UID_ShoppingCartPattern") == uidShoppingCartPattern;52 }53 }5455 [CompilerGenerated]56 private sealed class _003C_003Ec__DisplayClass11_157 {58 public List<IEntity> lFound;5960 internal bool _003C_LoadShoppingCartPattern_003Eb__3(IEntity c)61 {62 return !lFound.Contains(c);63 }64 }6566 [CompilerGenerated]67 private sealed class _003C_003Ec__DisplayClass11_268 {69 public string uidAccProduct;7071 internal bool _003C_LoadShoppingCartPattern_003Eb__2(IEntity c)72 {73 return string.Equals(c.GetValue<string>("UID_ACCProduct"), uidAccProduct);74 }75 }7677 [CompilerGenerated]78 private sealed class _003C_003Ec__DisplayClass12_079 {80 public IEntity dbPattern;8182 public IEntity entity;8384 internal ExpressionClause _003C_UpdateShoppingCartPattern_003Eb__0(IExpressionContext c)85 {86 return c.Column("UID_ShoppingCartPattern") == dbPattern.GetValue<string>("UID_ShoppingCartPattern");87 }8889 internal ExpressionClause _003C_UpdateShoppingCartPattern_003Eb__1(IExpressionContext c)90 {91 return c.Column("UID_PersonInserted") == entity.GetValue<string>("UID_Person") && c.Column("IsActivated") == true;92 }93 }9495 [CompilerGenerated]96 private sealed class _003C_003Ec__DisplayClass12_197 {98 public List<IEntity> lFound;99100 internal bool _003C_UpdateShoppingCartPattern_003Eb__3(IEntity p)101 {102 return !lFound.Contains(p);103 }104 }105106 [CompilerGenerated]107 private sealed class _003C_003Ec__DisplayClass12_2108 {109 public string uidAccProduct;110111 internal bool _003C_UpdateShoppingCartPattern_003Eb__2(IEntity c)112 {113 return string.Equals(c.GetValue<string>("UID_ACCProduct"), uidAccProduct);114 }115 }116117 [CompilerGenerated]118 private sealed class _003C_003Ec__DisplayClass14_0119 {120 public IEntity entity;121122 internal ExpressionClause _003C_CreateShoppingCartPattern_003Eb__0(IExpressionContext c)123 {124 return c.Column("UID_PersonInserted") == entity.GetValue<string>("UID_Person") && c.Column("IsActivated") == true;125 }126 }127128 [CompilerGenerated]129 private sealed class _003C_003Ec__DisplayClass24_0130 {131 public string uidITShopOrg;132133 internal bool _003C_CreateShoppingCartItemPwO_003Eb__0(IEntity o)134 {135 return o.GetValue<string>("UID_ITShopOrg") == uidITShopOrg;136 }137 }138139 [CompilerGenerated]140 private sealed class _003C_003Ec__DisplayClass24_1141 {142 public DbObjectKey okItem;143144 internal ExpressionClause _003C_CreateShoppingCartItemPwO_003Eb__1(IExpressionContext c)145 {146 return c.Column("ObjectKeyUsedBy") == okItem.ToXmlString();147 }148 }149150 [CompilerGenerated]151 private sealed class _003C_003Ec__DisplayClass25_0152 {153 public ItemInfo iInfo;154155 internal bool _003C_HierarchyPwOs_003Eb__1(IEntity e)156 {157 return string.Equals((string)e.GetValue("UID_ShoppingCartItem"), iInfo.UidShoppingCartItem);158 }159 }160161 [CompilerGenerated]162 private sealed class _003C_003Ec__DisplayClass25_1163 {164 public string uidParentItem;165166 internal bool _003C_HierarchyPwOs_003Eb__2(ItemInfo i)167 {168 return string.Equals(i.UidShoppingCartItem, uidParentItem, (StringComparison)4);169 }170 }171172 [CompilerGenerated]173 private sealed class _003C_003Ec__DisplayClass30_0174 {175 public IEntity entity;176177 internal ExpressionClause _003C_IsRightPasswordAnswer_003Eb__0(IExpressionContext c)178 {179 return c.Column("UID_Person") == entity.GetValue("UID_Person");180 }181 }182183 [CompilerGenerated]184 private sealed class _003C_003Ec__DisplayClass35_0185 {186 public ISession session;187188 public CancellationToken ct;189190 internal System.Threading.Tasks.Task<bool> _003C_AdminUserExists_003Eb__0(CancellationToken ctx)191 {192 //IL_002e: Unknown result type (might be due to invalid IL or missing references)193 string whereclause = session.SqlFormatter().UidComparison("UID_AERole", "QER-AEROLE-AEADMIN");194 return session.Source().ExistsAsync("PersonInAERole", whereclause, ct);195 }196 }197198 [CompilerGenerated]199 private sealed class _003C_003Ec__DisplayClass40_0200 {201 public string uidOrgPR;202203 internal ExpressionClause _003C_UniversalSubstitute_003Eb__1(IExpressionContext c)204 {205 return c.Column("UID_ITShopOrg") == uidOrgPR;206 }207 }208209 [CompilerGenerated]210 private sealed class _003C_003Ec__DisplayClass49_0211 {212 public string uidRealPerson;213214 internal ExpressionClause _003C_CheckRealPerson_003Eb__0(IExpressionContext c)215 {216 return c.Column("UID_Person") == uidRealPerson;217 }218 }219220 [CompilerGenerated]221 private sealed class _003C_003Ec__DisplayClass50_0222 {223 public string uidPersonMasterIdentity;224225 public IEntity entity;226227 internal ExpressionClause _003C_CheckPersonMasterIdentity_003Eb__0(IExpressionContext c)228 {229 return c.Column("UID_Person") == uidPersonMasterIdentity && c.Column("UID_PersonMasterIdentity") != string.Empty;230 }231232 internal ExpressionClause _003C_CheckPersonMasterIdentity_003Eb__1(IExpressionContext t)233 {234 return t.Column("UID_PersonMasterIdentity") == entity.GetValue<string>("UID_Person");235 }236 }237238 [CompilerGenerated]239 private sealed class _003C_003Ec__DisplayClass55_0240 {241 public MultiValueProperty mvpOld;242243 public Func<string, bool> _003C_003E9__0;244245 internal bool _003C_CheckUniqueAuthentifierLogins_003Eb__0(string s)246 {247 return !mvpOld.Contains(s);248 }249 }250251 [StructLayout((LayoutKind)3)]252 [CompilerGenerated]253 private struct _003COnSavingAsync_003Ed__4 : IAsyncStateMachine254 {255 public int _003C_003E1__state;256257 public AsyncTaskMethodBuilder<Diff> _003C_003Et__builder;258259 public IEntity entity;260261 public LogicReadWriteParameters p;262263 public CancellationToken ct;264265 public Person _003C_003E4__this;266267 private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__1;268269 private ConfiguredTaskAwaiter _003C_003Eu__2;270271 private IEntity _003C_003E7__wrap1;272273 private ConfiguredTaskAwaiter<System.DateTime> _003C_003Eu__3;274275 private ConfiguredValueTaskAwaiter<ApplyResult> _003C_003Eu__4;276277 private ConfiguredTaskAwaiter<Diff> _003C_003Eu__5;278279 private void MoveNext()280 {281 //IL_0145: Unknown result type (might be due to invalid IL or missing references)282 //IL_014a: Unknown result type (might be due to invalid IL or missing references)283 //IL_0152: Unknown result type (might be due to invalid IL or missing references)284 //IL_03cf: Unknown result type (might be due to invalid IL or missing references)285 //IL_03d4: Unknown result type (might be due to invalid IL or missing references)286 //IL_03dc: Unknown result type (might be due to invalid IL or missing references)287 //IL_0477: Unknown result type (might be due to invalid IL or missing references)288 //IL_047c: Unknown result type (might be due to invalid IL or missing references)289 //IL_0484: Unknown result type (might be due to invalid IL or missing references)290 //IL_04fc: Unknown result type (might be due to invalid IL or missing references)291 //IL_0501: Unknown result type (might be due to invalid IL or missing references)292 //IL_0509: Unknown result type (might be due to invalid IL or missing references)293 //IL_0586: Unknown result type (might be due to invalid IL or missing references)294 //IL_058b: Unknown result type (might be due to invalid IL or missing references)295 //IL_0593: Unknown result type (might be due to invalid IL or missing references)296 //IL_0609: Unknown result type (might be due to invalid IL or missing references)297 //IL_060e: Unknown result type (might be due to invalid IL or missing references)298 //IL_0616: Unknown result type (might be due to invalid IL or missing references)299 //IL_06ab: Unknown result type (might be due to invalid IL or missing references)300 //IL_06b0: Unknown result type (might be due to invalid IL or missing references)301 //IL_06b8: Unknown result type (might be due to invalid IL or missing references)302 //IL_072e: Unknown result type (might be due to invalid IL or missing references)303 //IL_0733: Unknown result type (might be due to invalid IL or missing references)304 //IL_073b: Unknown result type (might be due to invalid IL or missing references)305 //IL_07a6: Unknown result type (might be due to invalid IL or missing references)306 //IL_07ab: Unknown result type (might be due to invalid IL or missing references)307 //IL_07b3: Unknown result type (might be due to invalid IL or missing references)308 //IL_019b: Unknown result type (might be due to invalid IL or missing references)309 //IL_04af: Unknown result type (might be due to invalid IL or missing references)310 //IL_04be: Unknown result type (might be due to invalid IL or missing references)311 //IL_04c3: Unknown result type (might be due to invalid IL or missing references)312 //IL_04c7: Unknown result type (might be due to invalid IL or missing references)313 //IL_04cc: Unknown result type (might be due to invalid IL or missing references)314 //IL_0539: Unknown result type (might be due to invalid IL or missing references)315 //IL_0548: Unknown result type (might be due to invalid IL or missing references)316 //IL_054d: Unknown result type (might be due to invalid IL or missing references)317 //IL_0551: Unknown result type (might be due to invalid IL or missing references)318 //IL_0556: Unknown result type (might be due to invalid IL or missing references)319 //IL_05bc: Unknown result type (might be due to invalid IL or missing references)320 //IL_05cb: Unknown result type (might be due to invalid IL or missing references)321 //IL_05d0: Unknown result type (might be due to invalid IL or missing references)322 //IL_05d4: Unknown result type (might be due to invalid IL or missing references)323 //IL_05d9: Unknown result type (might be due to invalid IL or missing references)324 //IL_06e1: Unknown result type (might be due to invalid IL or missing references)325 //IL_06f0: Unknown result type (might be due to invalid IL or missing references)326 //IL_06f5: Unknown result type (might be due to invalid IL or missing references)327 //IL_06f9: Unknown result type (might be due to invalid IL or missing references)328 //IL_06fe: Unknown result type (might be due to invalid IL or missing references)329 //IL_0760: Unknown result type (might be due to invalid IL or missing references)330 //IL_076b: Unknown result type (might be due to invalid IL or missing references)331 //IL_0770: Unknown result type (might be due to invalid IL or missing references)332 //IL_0774: Unknown result type (might be due to invalid IL or missing references)333 //IL_0779: Unknown result type (might be due to invalid IL or missing references)334 //IL_04e1: Unknown result type (might be due to invalid IL or missing references)335 //IL_04e3: Unknown result type (might be due to invalid IL or missing references)336 //IL_056b: Unknown result type (might be due to invalid IL or missing references)337 //IL_056d: Unknown result type (might be due to invalid IL or missing references)338 //IL_05ee: Unknown result type (might be due to invalid IL or missing references)339 //IL_05f0: Unknown result type (might be due to invalid IL or missing references)340 //IL_0713: Unknown result type (might be due to invalid IL or missing references)341 //IL_0715: Unknown result type (might be due to invalid IL or missing references)342 //IL_078e: Unknown result type (might be due to invalid IL or missing references)343 //IL_0790: Unknown result type (might be due to invalid IL or missing references)344 //IL_042e: Unknown result type (might be due to invalid IL or missing references)345 //IL_0439: Unknown result type (might be due to invalid IL or missing references)346 //IL_043e: Unknown result type (might be due to invalid IL or missing references)347 //IL_0442: Unknown result type (might be due to invalid IL or missing references)348 //IL_0447: Unknown result type (might be due to invalid IL or missing references)349 //IL_065e: Unknown result type (might be due to invalid IL or missing references)350 //IL_066d: Unknown result type (might be due to invalid IL or missing references)351 //IL_0672: Unknown result type (might be due to invalid IL or missing references)352 //IL_0676: Unknown result type (might be due to invalid IL or missing references)353 //IL_067b: Unknown result type (might be due to invalid IL or missing references)354 //IL_045c: Unknown result type (might be due to invalid IL or missing references)355 //IL_045e: Unknown result type (might be due to invalid IL or missing references)356 //IL_0690: Unknown result type (might be due to invalid IL or missing references)357 //IL_0692: Unknown result type (might be due to invalid IL or missing references)358 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)359 //IL_0230: Unknown result type (might be due to invalid IL or missing references)360 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)361 //IL_0107: Unknown result type (might be due to invalid IL or missing references)362 //IL_010c: Unknown result type (might be due to invalid IL or missing references)363 //IL_0110: Unknown result type (might be due to invalid IL or missing references)364 //IL_0115: Unknown result type (might be due to invalid IL or missing references)365 //IL_0386: Unknown result type (might be due to invalid IL or missing references)366 //IL_0391: Unknown result type (might be due to invalid IL or missing references)367 //IL_0396: Unknown result type (might be due to invalid IL or missing references)368 //IL_039a: Unknown result type (might be due to invalid IL or missing references)369 //IL_039f: Unknown result type (might be due to invalid IL or missing references)370 //IL_012a: Unknown result type (might be due to invalid IL or missing references)371 //IL_012c: Unknown result type (might be due to invalid IL or missing references)372 //IL_03b4: Unknown result type (might be due to invalid IL or missing references)373 //IL_03b6: Unknown result type (might be due to invalid IL or missing references)374 int num = _003C_003E1__state;375 Person person = _003C_003E4__this;376 Diff result3;377 try378 {379 ConfiguredTaskAwaiter<IMetaTable> val5;380 ConfiguredTaskAwaiter val4;381 ConfiguredTaskAwaiter<System.DateTime> val3;382 ConfiguredValueTaskAwaiter<ApplyResult> val2;383 ConfiguredTaskAwaiter<Diff> val;384 System.DateTime result;385 IMetaTable result2;386 switch (num)387 {388 default:389 if (!entity.IsDeleted() && !p.Session.IsFullSync())390 {391 if (entity.Columns["IsTemporaryDeactivated"].IsChanged && entity.GetValue<bool>("IsTemporaryDeactivated") && !DbVal.IsEmpty(entity.Columns["DeactivationEnd"].GetValue(), ValType.Date) && entity.GetValue<System.DateTime>("DeactivationEnd") <= QERHelper.GetServerTime(p.Session, ct))392 {393 val5 = p.Session.MetaData().GetTableAsync("Person", ct).ConfigureAwait(false)394 .GetAwaiter();395 if (!val5.IsCompleted)396 {397 num = (_003C_003E1__state = 0);398 _003C_003Eu__1 = val5;399 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003COnSavingAsync_003Ed__4>(ref val5, ref this);400 return;401 }402 goto IL_0161;403 }404 if (entity.Columns["DeactivationEnd"].IsChanged || entity.Columns["DeactivationStart"].IsChanged)405 {406 System.DateTime value = entity.GetValue<System.DateTime>("DeactivationEnd");407 if (!DbVal.IsEmpty(value, ValType.Date) && entity.GetValue<bool>("IsTemporaryDeactivated") && value <= QERHelper.GetServerTime(p.Session, ct))408 {409 string[] array = new string[2]410 {411 p.Table.Columns["DeactivationEnd"].Display.Translated,412 System.DateTime.Today.ToString((IFormatProvider)(object)CultureInfo.InvariantCulture)413 };414 object[] theParams = array;415 throw new ViException(2133127, ExceptionRelevance.EndUser, theParams);416 }417 System.DateTime value2 = entity.GetValue<System.DateTime>("DeactivationStart");418 if (!DbVal.IsEmpty(value2, ValType.Date) && !DbVal.IsEmpty(value, ValType.Date) && value2 >= value)419 {420 string[] array2 = new string[2]421 {422 p.Table.Columns["DeactivationEnd"].Display.Translated,423 p.Table.Columns["DeactivationStart"].Display.Translated424 };425 object[] theParams = array2;426 throw new ViException(2133127, ExceptionRelevance.EndUser, theParams);427 }428 }429 if (entity.Columns["AuthentifierLogins"].IsChanged && !string.IsNullOrEmpty(entity.GetValue<string>("AuthentifierLogins")))430 {431 ConfiguredTaskAwaitable val6 = _CheckUniqueAuthentifierLogins(p.Session, entity, ct).ConfigureAwait(false);432 val4 = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();433 if (!((ConfiguredTaskAwaiter)(ref val4)).IsCompleted)434 {435 num = (_003C_003E1__state = 1);436 _003C_003Eu__2 = val4;437 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003COnSavingAsync_003Ed__4>(ref val4, ref this);438 return;439 }440 goto IL_03eb;441 }442 goto IL_03f2;443 }444 goto IL_0752;445 case 0:446 val5 = _003C_003Eu__1;447 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IMetaTable>);448 num = (_003C_003E1__state = -1);449 goto IL_0161;450 case 1:451 val4 = _003C_003Eu__2;452 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);453 num = (_003C_003E1__state = -1);454 goto IL_03eb;455 case 2:456 val3 = _003C_003Eu__3;457 _003C_003Eu__3 = default(ConfiguredTaskAwaiter<System.DateTime>);458 num = (_003C_003E1__state = -1);459 goto IL_0493;460 case 3:461 val2 = _003C_003Eu__4;462 _003C_003Eu__4 = default(ConfiguredValueTaskAwaiter<ApplyResult>);463 num = (_003C_003E1__state = -1);464 goto IL_0518;465 case 4:466 val2 = _003C_003Eu__4;467 _003C_003Eu__4 = default(ConfiguredValueTaskAwaiter<ApplyResult>);468 num = (_003C_003E1__state = -1);469 goto IL_05a2;470 case 5:471 val2 = _003C_003Eu__4;472 _003C_003Eu__4 = default(ConfiguredValueTaskAwaiter<ApplyResult>);473 num = (_003C_003E1__state = -1);474 goto IL_0625;475 case 6:476 val2 = _003C_003Eu__4;477 _003C_003Eu__4 = default(ConfiguredValueTaskAwaiter<ApplyResult>);478 num = (_003C_003E1__state = -1);479 goto IL_06c7;480 case 7:481 val2 = _003C_003Eu__4;482 _003C_003Eu__4 = default(ConfiguredValueTaskAwaiter<ApplyResult>);483 num = (_003C_003E1__state = -1);484 goto IL_074a;485 case 8:486 {487 val = _003C_003Eu__5;488 _003C_003Eu__5 = default(ConfiguredTaskAwaiter<Diff>);489 num = (_003C_003E1__state = -1);490 break;491 }492 IL_03f2:493 if (entity.Columns["DialogUserPassword"].IsDifferent)494 {495 IServerTimeProvider serverTimeProvider = p.Session.Resolve<IServerTimeProvider>();496 _003C_003E7__wrap1 = entity;497 val3 = serverTimeProvider.GetServerTimeAsync(ct).ConfigureAwait(false).GetAwaiter();498 if (!val3.IsCompleted)499 {500 num = (_003C_003E1__state = 2);501 _003C_003Eu__3 = val3;502 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.DateTime>, _003COnSavingAsync_003Ed__4>(ref val3, ref this);503 return;504 }505 goto IL_0493;506 }507 goto IL_062d;508 IL_0625:509 val2.GetResult();510 goto IL_062d;511 IL_03eb:512 ((ConfiguredTaskAwaiter)(ref val4)).GetResult();513 goto IL_03f2;514 IL_0493:515 result = val3.GetResult();516 val2 = _003C_003E7__wrap1.PutValueAsync("PasswordLastSet", result, ct).ConfigureAwait(false).GetAwaiter();517 if (!val2.IsCompleted)518 {519 num = (_003C_003E1__state = 3);520 _003C_003Eu__4 = val2;521 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003COnSavingAsync_003Ed__4>(ref val2, ref this);522 return;523 }524 goto IL_0518;525 IL_0752:526 val = ((StateBasedEntityLogic)person).OnSavingAsync(entity, p, ct).ConfigureAwait(false).GetAwaiter();527 if (!val.IsCompleted)528 {529 num = (_003C_003E1__state = 8);530 _003C_003Eu__5 = val;531 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<Diff>, _003COnSavingAsync_003Ed__4>(ref val, ref this);532 return;533 }534 break;535 IL_0518:536 val2.GetResult();537 _003C_003E7__wrap1 = null;538 val2 = entity.PutValueAsync("BadPasswordAttempts", 0, ct).ConfigureAwait(false).GetAwaiter();539 if (!val2.IsCompleted)540 {541 num = (_003C_003E1__state = 4);542 _003C_003Eu__4 = val2;543 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003COnSavingAsync_003Ed__4>(ref val2, ref this);544 return;545 }546 goto IL_05a2;547 IL_074a:548 val2.GetResult();549 goto IL_0752;550 IL_0161:551 result2 = val5.GetResult();552 throw new ViException(2133127, ExceptionRelevance.EndUser, result2.Columns["DeactivationEnd"].Display, QERHelper.GetServerTime(p.Session, ct));553 IL_062d:554 if (entity.Columns["Passcode"].IsDifferent)555 {556 val2 = entity.PutValueAsync("BadPwdAnswerAttempts", 0, ct).ConfigureAwait(false).GetAwaiter();557 if (!val2.IsCompleted)558 {559 num = (_003C_003E1__state = 6);560 _003C_003Eu__4 = val2;561 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003COnSavingAsync_003Ed__4>(ref val2, ref this);562 return;563 }564 goto IL_06c7;565 }566 goto IL_0752;567 IL_06c7:568 val2.GetResult();569 val2 = entity.PutValueAsync("IsLockedPwdAnswer", 0, ct).ConfigureAwait(false).GetAwaiter();570 if (!val2.IsCompleted)571 {572 num = (_003C_003E1__state = 7);573 _003C_003Eu__4 = val2;574 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003COnSavingAsync_003Ed__4>(ref val2, ref this);575 return;576 }577 goto IL_074a;578 IL_05a2:579 val2.GetResult();580 val2 = entity.PutValueAsync("IsLockedOut", 0, ct).ConfigureAwait(false).GetAwaiter();581 if (!val2.IsCompleted)582 {583 num = (_003C_003E1__state = 5);584 _003C_003Eu__4 = val2;585 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003COnSavingAsync_003Ed__4>(ref val2, ref this);586 return;587 }588 goto IL_0625;589 }590 result3 = val.GetResult();591 }592 catch (System.Exception exception)593 {594 _003C_003E1__state = -2;595 _003C_003Et__builder.SetException(exception);596 return;597 }598 _003C_003E1__state = -2;599 _003C_003Et__builder.SetResult(result3);600 }601602 [DebuggerHidden]603 private void SetStateMachine(IAsyncStateMachine stateMachine)604 {605 _003C_003Et__builder.SetStateMachine(stateMachine);606 }607 }608609 [StructLayout((LayoutKind)3)]610 [CompilerGenerated]611 private struct _003CRunQueryAsync_003Ed__42 : IAsyncStateMachine612 {613 public int _003C_003E1__state;614615 public AsyncTaskMethodBuilder<IDataReader> _003C_003Et__builder;616617 public ISession session;618619 public string sqlKey;620621 public object[] vArgs;622623 public CancellationToken ct;624625 private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__1;626627 private void MoveNext()628 {629 //IL_007d: Unknown result type (might be due to invalid IL or missing references)630 //IL_0082: Unknown result type (might be due to invalid IL or missing references)631 //IL_0089: Unknown result type (might be due to invalid IL or missing references)632 //IL_0039: Unknown result type (might be due to invalid IL or missing references)633 //IL_0044: Unknown result type (might be due to invalid IL or missing references)634 //IL_0049: Unknown result type (might be due to invalid IL or missing references)635 //IL_004d: Unknown result type (might be due to invalid IL or missing references)636 //IL_0052: Unknown result type (might be due to invalid IL or missing references)637 //IL_0066: Unknown result type (might be due to invalid IL or missing references)638 //IL_0067: Unknown result type (might be due to invalid IL or missing references)639 int num = _003C_003E1__state;640 IDataReader result;641 try642 {643 ConfiguredTaskAwaiter<DbDataReader> val;644 if (num != 0)645 {646 IDbSession dbSession = session.Resolve<IDbSession>();647 string sqlStatement = SqlStrings.Format(session.Database().SystemIdentifier, sqlKey, vArgs);648 val = dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false).GetAwaiter();649 if (!val.IsCompleted)650 {651 num = (_003C_003E1__state = 0);652 _003C_003Eu__1 = val;653 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003CRunQueryAsync_003Ed__42>(ref val, ref this);654 return;655 }656 }657 else658 {659 val = _003C_003Eu__1;660 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbDataReader>);661 num = (_003C_003E1__state = -1);662 }663 result = (IDataReader)(object)val.GetResult();664 }665 catch (System.Exception exception)666 {667 _003C_003E1__state = -2;668 _003C_003Et__builder.SetException(exception);669 return;670 }671 _003C_003E1__state = -2;672 _003C_003Et__builder.SetResult(result);673 }674675 [DebuggerHidden]676 private void SetStateMachine(IAsyncStateMachine stateMachine)677 {678 _003C_003Et__builder.SetStateMachine(stateMachine);679 }680 }681682 [StructLayout((LayoutKind)3)]683 [CompilerGenerated]684 private struct _003CRunSqlAsync_003Ed__41<T> : IAsyncStateMachine where T : notnull685 {686 public int _003C_003E1__state;687688 public AsyncTaskMethodBuilder<T> _003C_003Et__builder;689690 public ISession session;691692 public string sqlKey;693694 public object[] vArgs;695696 public CancellationToken ct;697698 private ConfiguredTaskAwaiter<object> _003C_003Eu__1;699700 private void MoveNext()701 {702 //IL_0083: Unknown result type (might be due to invalid IL or missing references)703 //IL_0088: Unknown result type (might be due to invalid IL or missing references)704 //IL_008f: Unknown result type (might be due to invalid IL or missing references)705 //IL_003f: Unknown result type (might be due to invalid IL or missing references)706 //IL_004a: Unknown result type (might be due to invalid IL or missing references)707 //IL_004f: Unknown result type (might be due to invalid IL or missing references)708 //IL_0053: Unknown result type (might be due to invalid IL or missing references)709 //IL_0058: Unknown result type (might be due to invalid IL or missing references)710 //IL_006c: Unknown result type (might be due to invalid IL or missing references)711 //IL_006d: Unknown result type (might be due to invalid IL or missing references)712 int num = _003C_003E1__state;713 T result;714 try715 {716 ConfiguredTaskAwaiter<object> val;717 if (num != 0)718 {719 val = session.Resolve<IDbSession>().SqlExecuteScalarInContextAsync(statement: SqlStrings.Format(session.Database().SystemIdentifier, sqlKey, vArgs), session: session, cancellationToken: ct).ConfigureAwait(false)720 .GetAwaiter();721 if (!val.IsCompleted)722 {723 num = (_003C_003E1__state = 0);724 _003C_003Eu__1 = val;725 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<object>, _003CRunSqlAsync_003Ed__41<T>>(ref val, ref this);726 return;727 }728 }729 else730 {731 val = _003C_003Eu__1;732 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<object>);733 num = (_003C_003E1__state = -1);734 }735 result = DbVal.ConvertTo<T>(val.GetResult());736 }737 catch (System.Exception exception)738 {739 _003C_003E1__state = -2;740 _003C_003Et__builder.SetException(exception);741 return;742 }743 _003C_003E1__state = -2;744 _003C_003Et__builder.SetResult(result);745 }746747 [DebuggerHidden]748 private void SetStateMachine(IAsyncStateMachine stateMachine)749 {750 _003C_003Et__builder.SetStateMachine(stateMachine);751 }752 }753754 [StructLayout((LayoutKind)3)]755 [CompilerGenerated]756 private struct _003C_AddWorkTime_003Ed__8 : IAsyncStateMachine757 {758 public int _003C_003E1__state;759760 public AsyncTaskMethodBuilder<System.DateTime> _003C_003Et__builder;761762 public ISession session;763764 public System.DateTime dtUncBase;765766 public int addMinutes;767768 public IEntity entity;769770 public CancellationToken ct;771772 private IDbSession _003CcSql_003E5__2;773774 private string _003CstrSql_003E5__3;775776 private ConfiguredTaskAwaiter _003C_003Eu__1;777778 private ConfiguredTaskAwaiter<object> _003C_003Eu__2;779780 private void MoveNext()781 {782 //IL_0102: Unknown result type (might be due to invalid IL or missing references)783 //IL_0107: Unknown result type (might be due to invalid IL or missing references)784 //IL_010e: Unknown result type (might be due to invalid IL or missing references)785 //IL_0131: Unknown result type (might be due to invalid IL or missing references)786 //IL_013c: Unknown result type (might be due to invalid IL or missing references)787 //IL_0141: Unknown result type (might be due to invalid IL or missing references)788 //IL_0145: Unknown result type (might be due to invalid IL or missing references)789 //IL_014a: Unknown result type (might be due to invalid IL or missing references)790 //IL_0177: Unknown result type (might be due to invalid IL or missing references)791 //IL_017c: Unknown result type (might be due to invalid IL or missing references)792 //IL_0184: Unknown result type (might be due to invalid IL or missing references)793 //IL_015f: Unknown result type (might be due to invalid IL or missing references)794 //IL_0161: Unknown result type (might be due to invalid IL or missing references)795 //IL_00bb: Unknown result type (might be due to invalid IL or missing references)796 //IL_00c6: Unknown result type (might be due to invalid IL or missing references)797 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)798 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)799 //IL_00d4: Unknown result type (might be due to invalid IL or missing references)800 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)801 //IL_00e9: Unknown result type (might be due to invalid IL or missing references)802 int num = _003C_003E1__state;803 System.DateTime result;804 try805 {806 ConfiguredTaskAwaiter<object> val;807 ConfiguredTaskAwaiter val3;808 if (num != 0)809 {810 if (num == 1)811 {812 val = _003C_003Eu__2;813 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<object>);814 num = (_003C_003E1__state = -1);815 goto IL_0193;816 }817 ISqlFormatter sqlFormatter = session.SqlFormatter();818 _003CcSql_003E5__2 = session.Resolve<IDbSession>();819 _003CstrSql_003E5__3 = sqlFormatter.FunctionCall(new SqlFunction("QER", "Gconvert", "FCVTimeToWorkTimePerson"), sqlFormatter.FormatValue(dtUncBase, ValType.Date), sqlFormatter.FormatValue(addMinutes, ValType.Int), sqlFormatter.FormatUidValue(entity.GetValue<string>("UID_Person")));820 IDbSession dbSession = _003CcSql_003E5__2;821 IUserIdentity userIdentity = session.User();822 ConfiguredTaskAwaitable val2 = dbSession.SetContextDataAsync(null, (userIdentity != null) ? ((IIdentity)userIdentity).Name : null, 0, EnvironmentFlags.None, ct).ConfigureAwait(false);823 val3 = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();824 if (!((ConfiguredTaskAwaiter)(ref val3)).IsCompleted)825 {826 num = (_003C_003E1__state = 0);827 _003C_003Eu__1 = val3;828 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_AddWorkTime_003Ed__8>(ref val3, ref this);829 return;830 }831 }832 else833 {834 val3 = _003C_003Eu__1;835 _003C_003Eu__1 = default(ConfiguredTaskAwaiter);836 num = (_003C_003E1__state = -1);837 }838 ((ConfiguredTaskAwaiter)(ref val3)).GetResult();839 val = _003CcSql_003E5__2.SqlExecuteScalarAsync(_003CstrSql_003E5__3, ct).ConfigureAwait(false).GetAwaiter();840 if (!val.IsCompleted)841 {842 num = (_003C_003E1__state = 1);843 _003C_003Eu__2 = val;844 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<object>, _003C_AddWorkTime_003Ed__8>(ref val, ref this);845 return;846 }847 goto IL_0193;848 IL_0193:849 result = DbVal.ConvertTo<System.DateTime>(val.GetResult());850 }851 catch (System.Exception exception)852 {853 _003C_003E1__state = -2;854 _003CcSql_003E5__2 = null;855 _003CstrSql_003E5__3 = null;856 _003C_003Et__builder.SetException(exception);857 return;858 }859 _003C_003E1__state = -2;860 _003CcSql_003E5__2 = null;861 _003CstrSql_003E5__3 = null;862 _003C_003Et__builder.SetResult(result);863 }864865 [DebuggerHidden]866 private void SetStateMachine(IAsyncStateMachine stateMachine)867 {868 _003C_003Et__builder.SetStateMachine(stateMachine);869 }870 }871872 [StructLayout((LayoutKind)3)]873 [CompilerGenerated]874 private struct _003C_AdminUserExists_003Ed__35 : IAsyncStateMachine875 {876 public int _003C_003E1__state;877878 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;879880 public ISession session;881882 public CancellationToken ct;883884 public IEntity entity;885886 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;887888 private void MoveNext()889 {890 //IL_015c: Unknown result type (might be due to invalid IL or missing references)891 //IL_0161: Unknown result type (might be due to invalid IL or missing references)892 //IL_0169: Unknown result type (might be due to invalid IL or missing references)893 //IL_0021: Unknown result type (might be due to invalid IL or missing references)894 //IL_0026: Unknown result type (might be due to invalid IL or missing references)895 //IL_0116: Unknown result type (might be due to invalid IL or missing references)896 //IL_0121: Unknown result type (might be due to invalid IL or missing references)897 //IL_0126: Unknown result type (might be due to invalid IL or missing references)898 //IL_012a: Unknown result type (might be due to invalid IL or missing references)899 //IL_012f: Unknown result type (might be due to invalid IL or missing references)900 //IL_0144: Unknown result type (might be due to invalid IL or missing references)901 //IL_0146: Unknown result type (might be due to invalid IL or missing references)902 int num = _003C_003E1__state;903 bool result;904 try905 {906 ConfiguredTaskAwaiter<bool> val;907 if (num == 0)908 {909 val = _003C_003Eu__1;910 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);911 num = (_003C_003E1__state = -1);912 goto IL_0178;913 }914 _003C_003Ec__DisplayClass35_0 CS_0024_003C_003E8__locals11 = new _003C_003Ec__DisplayClass35_0915 {916 session = this.session,917 ct = ct918 };919 if (!entity.IsLoaded)920 {921 result = true;922 }923 else924 {925 if (CS_0024_003C_003E8__locals11.session.User().IsDialogAdmin)926 {927 AsyncLazy<bool> asyncLazy;928 if (CS_0024_003C_003E8__locals11.session.Variables.Contains("QER.Customizer.Person.AdminUserExists"))929 {930 asyncLazy = (AsyncLazy<bool>)CS_0024_003C_003E8__locals11.session.Variables.Get("QER.Customizer.Person.AdminUserExists");931 }932 else933 {934 ISession session = CS_0024_003C_003E8__locals11.session;935 bool flag = false;936 try937 {938 Monitor.Enter((object)session, ref flag);939 if (CS_0024_003C_003E8__locals11.session.Variables.Contains("QER.Customizer.Person.AdminUserExists"))940 {941 asyncLazy = (AsyncLazy<bool>)CS_0024_003C_003E8__locals11.session.Variables.Get("QER.Customizer.Person.AdminUserExists");942 }943 else944 {945 asyncLazy = new AsyncLazy<bool>(delegate946 {947 //IL_002e: Unknown result type (might be due to invalid IL or missing references)948 string whereclause = CS_0024_003C_003E8__locals11.session.SqlFormatter().UidComparison("UID_AERole", "QER-AEROLE-AEADMIN");949 return CS_0024_003C_003E8__locals11.session.Source().ExistsAsync("PersonInAERole", whereclause, CS_0024_003C_003E8__locals11.ct);950 }, (LazyThreadSafetyMode)2);951 CS_0024_003C_003E8__locals11.session.Variables.Put("QER.Customizer.Person.AdminUserExists", asyncLazy);952 }953 }954 finally955 {956 if (num < 0 && flag)957 {958 Monitor.Exit((object)session);959 }960 }961 }962 val = asyncLazy.GetValueAsync(CS_0024_003C_003E8__locals11.ct).ConfigureAwait(false).GetAwaiter();963 if (!val.IsCompleted)964 {965 num = (_003C_003E1__state = 0);966 _003C_003Eu__1 = val;967 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_AdminUserExists_003Ed__35>(ref val, ref this);968 return;969 }970 goto IL_0178;971 }972 result = true;973 }974 goto end_IL_0007;975 IL_0178:976 result = val.GetResult();977 end_IL_0007:;978 }979 catch (System.Exception exception)980 {981 _003C_003E1__state = -2;982 _003C_003Et__builder.SetException(exception);983 return;984 }985 _003C_003E1__state = -2;986 _003C_003Et__builder.SetResult(result);987 }988989 [DebuggerHidden]990 private void SetStateMachine(IAsyncStateMachine stateMachine)991 {992 _003C_003Et__builder.SetStateMachine(stateMachine);993 }994 }995996 [StructLayout((LayoutKind)3)]997 [CompilerGenerated]998 private struct _003C_CheckDeactivationEnd_003Ed__52 : IAsyncStateMachine999 {1000 public int _003C_003E1__state;10011002 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;10031004 public ISession session;10051006 public CancellationToken ct;10071008 public System.DateTime dtDeactivationEnd;10091010 private System.DateTime _003CdtServer_003E5__2;10111012 private ConfiguredTaskAwaiter<System.DateTime> _003C_003Eu__1;10131014 private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__2;10151016 private void MoveNext()1017 {1018 //IL_0064: Unknown result type (might be due to invalid IL or missing references)1019 //IL_0069: Unknown result type (might be due to invalid IL or missing references)1020 //IL_0070: Unknown result type (might be due to invalid IL or missing references)1021 //IL_0113: Unknown result type (might be due to invalid IL or missing references)1022 //IL_0118: Unknown result type (might be due to invalid IL or missing references)1023 //IL_0120: Unknown result type (might be due to invalid IL or missing references)1024 //IL_001d: Unknown result type (might be due to invalid IL or missing references)1025 //IL_0028: Unknown result type (might be due to invalid IL or missing references)1026 //IL_002d: Unknown result type (might be due to invalid IL or missing references)1027 //IL_0031: Unknown result type (might be due to invalid IL or missing references)1028 //IL_0036: Unknown result type (might be due to invalid IL or missing references)1029 //IL_004a: Unknown result type (might be due to invalid IL or missing references)1030 //IL_004b: Unknown result type (might be due to invalid IL or missing references)1031 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)1032 //IL_00d5: Unknown result type (might be due to invalid IL or missing references)1033 //IL_00da: Unknown result type (might be due to invalid IL or missing references)1034 //IL_00de: Unknown result type (might be due to invalid IL or missing references)1035 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)1036 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)1037 //IL_00fa: Unknown result type (might be due to invalid IL or missing references)1038 int num = _003C_003E1__state;1039 bool result2;1040 try1041 {1042 ConfiguredTaskAwaiter<IMetaTable> val;1043 ConfiguredTaskAwaiter<System.DateTime> val2;1044 if (num != 0)1045 {1046 if (num == 1)1047 {1048 val = _003C_003Eu__2;1049 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<IMetaTable>);1050 num = (_003C_003E1__state = -1);1051 goto IL_012f;1052 }1053 val2 = session.Resolve<IDbSession>().GetServerTimeAsync(ct).ConfigureAwait(false)1054 .GetAwaiter();1055 if (!val2.IsCompleted)1056 {1057 num = (_003C_003E1__state = 0);1058 _003C_003Eu__1 = val2;1059 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.DateTime>, _003C_CheckDeactivationEnd_003Ed__52>(ref val2, ref this);1060 return;1061 }1062 }1063 else1064 {1065 val2 = _003C_003Eu__1;1066 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<System.DateTime>);1067 num = (_003C_003E1__state = -1);1068 }1069 System.DateTime result = val2.GetResult();1070 _003CdtServer_003E5__2 = result;1071 if (DbVal.MinDate != dtDeactivationEnd && dtDeactivationEnd <= _003CdtServer_003E5__2)1072 {1073 val = session.MetaData().GetTableAsync("Person", ct).ConfigureAwait(false)1074 .GetAwaiter();1075 if (!val.IsCompleted)1076 {1077 num = (_003C_003E1__state = 1);1078 _003C_003Eu__2 = val;1079 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_CheckDeactivationEnd_003Ed__52>(ref val, ref this);1080 return;1081 }1082 goto IL_012f;1083 }1084 result2 = true;1085 goto end_IL_0007;1086 IL_012f:1087 IMetaTable result3 = val.GetResult();1088 string text = DbVal.ConvertTo<string>(DbVal.FromUniversalTime(_003CdtServer_003E5__2, session.TimeZone));1089 throw new ViException(2133127, ExceptionRelevance.EndUser, result3.Columns["DeactivationEnd"].Display, text);1090 end_IL_0007:;1091 }1092 catch (System.Exception exception)1093 {1094 _003C_003E1__state = -2;1095 _003C_003Et__builder.SetException(exception);1096 return;1097 }1098 _003C_003E1__state = -2;1099 _003C_003Et__builder.SetResult(result2);1100 }11011102 [DebuggerHidden]1103 private void SetStateMachine(IAsyncStateMachine stateMachine)1104 {1105 _003C_003Et__builder.SetStateMachine(stateMachine);1106 }1107 }11081109 [StructLayout((LayoutKind)3)]1110 [CompilerGenerated]1111 private struct _003C_CheckDialogUser_003Ed__48 : IAsyncStateMachine1112 {1113 public int _003C_003E1__state;11141115 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;11161117 public string uidDialogUser;11181119 public ISession session;11201121 public CancellationToken ct;11221123 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;11241125 private void MoveNext()1126 {1127 //IL_009a: Unknown result type (might be due to invalid IL or missing references)1128 //IL_009f: Unknown result type (might be due to invalid IL or missing references)1129 //IL_00a6: Unknown result type (might be due to invalid IL or missing references)1130 //IL_0056: Unknown result type (might be due to invalid IL or missing references)1131 //IL_0061: Unknown result type (might be due to invalid IL or missing references)1132 //IL_0066: Unknown result type (might be due to invalid IL or missing references)1133 //IL_006a: Unknown result type (might be due to invalid IL or missing references)1134 //IL_006f: Unknown result type (might be due to invalid IL or missing references)1135 //IL_0083: Unknown result type (might be due to invalid IL or missing references)1136 //IL_0084: Unknown result type (might be due to invalid IL or missing references)1137 int num = _003C_003E1__state;1138 bool result;1139 try1140 {1141 ConfiguredTaskAwaiter<bool> val;1142 if (num == 0)1143 {1144 val = _003C_003Eu__1;1145 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);1146 num = (_003C_003E1__state = -1);1147 goto IL_00b5;1148 }1149 if (!DbVal.IsEmpty(uidDialogUser, ValType.String))1150 {1151 ISqlFormatter formatter = session.SqlFormatter();1152 val = session.Source().GetSingleValueAsync<bool>("DialogUser", "IsDynamicUser", formatter.UidComparison("UID_DialogUser", uidDialogUser), ct).ConfigureAwait(false)1153 .GetAwaiter();1154 if (!val.IsCompleted)1155 {1156 num = (_003C_003E1__state = 0);1157 _003C_003Eu__1 = val;1158 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_CheckDialogUser_003Ed__48>(ref val, ref this);1159 return;1160 }1161 goto IL_00b5;1162 }1163 result = true;1164 goto end_IL_0007;1165 IL_00b5:1166 if (val.GetResult())1167 {1168 throw new ViException(2133068, ExceptionRelevance.EndUser);1169 }1170 result = true;1171 end_IL_0007:;1172 }1173 catch (System.Exception exception)1174 {1175 _003C_003E1__state = -2;1176 _003C_003Et__builder.SetException(exception);1177 return;1178 }1179 _003C_003E1__state = -2;1180 _003C_003Et__builder.SetResult(result);1181 }11821183 [DebuggerHidden]1184 private void SetStateMachine(IAsyncStateMachine stateMachine)1185 {1186 _003C_003Et__builder.SetStateMachine(stateMachine);1187 }1188 }11891190 [StructLayout((LayoutKind)3)]1191 [CompilerGenerated]1192 private struct _003C_CheckPersonMasterIdentity_003Ed__50 : IAsyncStateMachine1193 {1194 public int _003C_003E1__state;11951196 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;11971198 public string uidPersonMasterIdentity;11991200 public IEntity entity;12011202 public ISession session;12031204 public CancellationToken ct;12051206 private _003C_003Ec__DisplayClass50_0 _003C_003E8__1;12071208 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;12091210 private void MoveNext()1211 {1212 //IL_010a: Unknown result type (might be due to invalid IL or missing references)1213 //IL_010f: Unknown result type (might be due to invalid IL or missing references)1214 //IL_0117: Unknown result type (might be due to invalid IL or missing references)1215 //IL_01b4: Unknown result type (might be due to invalid IL or missing references)1216 //IL_01b9: Unknown result type (might be due to invalid IL or missing references)1217 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)1218 //IL_016e: Unknown result type (might be due to invalid IL or missing references)1219 //IL_0179: Unknown result type (might be due to invalid IL or missing references)1220 //IL_017e: Unknown result type (might be due to invalid IL or missing references)1221 //IL_0182: Unknown result type (might be due to invalid IL or missing references)1222 //IL_0187: Unknown result type (might be due to invalid IL or missing references)1223 //IL_019c: Unknown result type (might be due to invalid IL or missing references)1224 //IL_019e: Unknown result type (might be due to invalid IL or missing references)1225 //IL_00c1: Unknown result type (might be due to invalid IL or missing references)1226 //IL_00cc: Unknown result type (might be due to invalid IL or missing references)1227 //IL_00d1: Unknown result type (might be due to invalid IL or missing references)1228 //IL_00d5: Unknown result type (might be due to invalid IL or missing references)1229 //IL_00da: Unknown result type (might be due to invalid IL or missing references)1230 //IL_00ef: Unknown result type (might be due to invalid IL or missing references)1231 //IL_00f1: Unknown result type (might be due to invalid IL or missing references)1232 int num = _003C_003E1__state;1233 bool result;1234 try1235 {1236 ConfiguredTaskAwaiter<bool> val;1237 if (num == 0)1238 {1239 val = _003C_003Eu__1;1240 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);1241 num = (_003C_003E1__state = -1);1242 goto IL_0126;1243 }1244 if (num == 1)1245 {1246 val = _003C_003Eu__1;1247 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);1248 num = (_003C_003E1__state = -1);1249 goto IL_01d0;1250 }1251 _003C_003E8__1 = new _003C_003Ec__DisplayClass50_0();1252 _003C_003E8__1.uidPersonMasterIdentity = uidPersonMasterIdentity;1253 _003C_003E8__1.entity = entity;1254 if (!string.IsNullOrEmpty(_003C_003E8__1.uidPersonMasterIdentity))1255 {1256 if (string.Equals(_003C_003E8__1.entity.GetValue<string>("UID_Person"), _003C_003E8__1.uidPersonMasterIdentity, (StringComparison)4))1257 {1258 throw new ViException(2133158, ExceptionRelevance.EndUser);1259 }1260 Query query = (from c in Query.From("Person")1261 where c.Column("UID_Person") == _003C_003E8__1.uidPersonMasterIdentity && c.Column("UID_PersonMasterIdentity") != string.Empty1262 select c).GetQuery();1263 val = session.Source().ExistsAsync(query, ct).ConfigureAwait(false)1264 .GetAwaiter();1265 if (!val.IsCompleted)1266 {1267 num = (_003C_003E1__state = 0);1268 _003C_003Eu__1 = val;1269 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_CheckPersonMasterIdentity_003Ed__50>(ref val, ref this);1270 return;1271 }1272 goto IL_0126;1273 }1274 result = true;1275 goto end_IL_0007;1276 IL_01d0:1277 if (val.GetResult())1278 {1279 throw new ViException(2133412, ExceptionRelevance.EndUser);1280 }1281 result = true;1282 goto end_IL_0007;1283 IL_0126:1284 if (val.GetResult())1285 {1286 throw new ViException(2133268, ExceptionRelevance.EndUser);1287 }1288 Query query2 = (from t in Query.From("Person")1289 where t.Column("UID_PersonMasterIdentity") == _003C_003E8__1.entity.GetValue<string>("UID_Person")1290 select t).GetQuery();1291 val = session.Source().ExistsAsync(query2, ct).ConfigureAwait(false)1292 .GetAwaiter();1293 if (!val.IsCompleted)1294 {1295 num = (_003C_003E1__state = 1);1296 _003C_003Eu__1 = val;1297 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_CheckPersonMasterIdentity_003Ed__50>(ref val, ref this);1298 return;1299 }1300 goto IL_01d0;1301 end_IL_0007:;1302 }1303 catch (System.Exception exception)1304 {1305 _003C_003E1__state = -2;1306 _003C_003E8__1 = null;1307 _003C_003Et__builder.SetException(exception);1308 return;1309 }1310 _003C_003E1__state = -2;1311 _003C_003E8__1 = null;1312 _003C_003Et__builder.SetResult(result);1313 }13141315 [DebuggerHidden]1316 private void SetStateMachine(IAsyncStateMachine stateMachine)1317 {1318 _003C_003Et__builder.SetStateMachine(stateMachine);1319 }1320 }13211322 [StructLayout((LayoutKind)3)]1323 [CompilerGenerated]1324 private struct _003C_CheckRealPerson_003Ed__49 : IAsyncStateMachine1325 {1326 public int _003C_003E1__state;13271328 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;13291330 public string uidRealPerson;13311332 public IEntity entity;13331334 public ISession session;13351336 public CancellationToken ct;13371338 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;13391340 private void MoveNext()1341 {1342 //IL_00df: Unknown result type (might be due to invalid IL or missing references)1343 //IL_00e4: Unknown result type (might be due to invalid IL or missing references)1344 //IL_00ec: Unknown result type (might be due to invalid IL or missing references)1345 //IL_0099: Unknown result type (might be due to invalid IL or missing references)1346 //IL_00a4: Unknown result type (might be due to invalid IL or missing references)1347 //IL_00a9: Unknown result type (might be due to invalid IL or missing references)1348 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)1349 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)1350 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)1351 //IL_00c9: Unknown result type (might be due to invalid IL or missing references)1352 int num = _003C_003E1__state;1353 bool result;1354 try1355 {1356 ConfiguredTaskAwaiter<bool> val;1357 if (num == 0)1358 {1359 val = _003C_003Eu__1;1360 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);1361 num = (_003C_003E1__state = -1);1362 goto IL_00fb;1363 }1364 _003C_003Ec__DisplayClass49_0 CS_0024_003C_003E8__locals3 = new _003C_003Ec__DisplayClass49_01365 {1366 uidRealPerson = uidRealPerson1367 };1368 if (!string.IsNullOrEmpty(CS_0024_003C_003E8__locals3.uidRealPerson))1369 {1370 if (string.Compare(entity.GetValue<string>("UID_Person"), CS_0024_003C_003E8__locals3.uidRealPerson, (StringComparison)4) == 0)1371 {1372 throw new ViException(2133158, ExceptionRelevance.EndUser);1373 }1374 Query query = (from c in Query.From("Person")1375 where c.Column("UID_Person") == CS_0024_003C_003E8__locals3.uidRealPerson1376 select c).Select("IsDummyPerson");1377 val = session.Source().GetSingleValueAsync<bool>(query, ct).ConfigureAwait(false)1378 .GetAwaiter();1379 if (!val.IsCompleted)1380 {1381 num = (_003C_003E1__state = 0);1382 _003C_003Eu__1 = val;1383 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_CheckRealPerson_003Ed__49>(ref val, ref this);1384 return;1385 }1386 goto IL_00fb;1387 }1388 result = true;1389 goto end_IL_0007;1390 IL_00fb:1391 if (val.GetResult())1392 {1393 throw new ViException(2133114, ExceptionRelevance.EndUser);1394 }1395 result = true;1396 end_IL_0007:;1397 }1398 catch (System.Exception exception)1399 {1400 _003C_003E1__state = -2;1401 _003C_003Et__builder.SetException(exception);1402 return;1403 }1404 _003C_003E1__state = -2;1405 _003C_003Et__builder.SetResult(result);1406 }14071408 [DebuggerHidden]1409 private void SetStateMachine(IAsyncStateMachine stateMachine)1410 {1411 _003C_003Et__builder.SetStateMachine(stateMachine);1412 }1413 }14141415 [StructLayout((LayoutKind)3)]1416 [CompilerGenerated]1417 private struct _003C_CheckUniqueAuthentifierLogins_003Ed__55 : IAsyncStateMachine1418 {1419 public int _003C_003E1__state;14201421 public AsyncTaskMethodBuilder _003C_003Et__builder;14221423 public IEntity entity;14241425 public ISession session;14261427 public CancellationToken ct;14281429 private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__1;14301431 private void MoveNext()1432 {1433 //IL_01b7: Unknown result type (might be due to invalid IL or missing references)1434 //IL_01bc: Unknown result type (might be due to invalid IL or missing references)1435 //IL_01c4: Unknown result type (might be due to invalid IL or missing references)1436 //IL_016e: Unknown result type (might be due to invalid IL or missing references)1437 //IL_0179: Unknown result type (might be due to invalid IL or missing references)1438 //IL_017e: Unknown result type (might be due to invalid IL or missing references)1439 //IL_0182: Unknown result type (might be due to invalid IL or missing references)1440 //IL_0187: Unknown result type (might be due to invalid IL or missing references)1441 //IL_019c: Unknown result type (might be due to invalid IL or missing references)1442 //IL_019e: Unknown result type (might be due to invalid IL or missing references)1443 int num = _003C_003E1__state;1444 try1445 {1446 ConfiguredTaskAwaiter<DbDataReader> val;1447 if (num == 0)1448 {1449 val = _003C_003Eu__1;1450 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbDataReader>);1451 num = (_003C_003E1__state = -1);1452 goto IL_01d3;1453 }1454 _003C_003Ec__DisplayClass55_0 CS_0024_003C_003E8__locals1 = new _003C_003Ec__DisplayClass55_01455 {1456 mvpOld = new MultiValueProperty(entity.Columns["AuthentifierLogins"].GetOldValue<string>())1457 };1458 MultiValueProperty multiValueProperty = new MultiValueProperty(entity.Columns["AuthentifierLogins"].GetValue<string>());1459 MultiValueProperty multiValueProperty2 = new MultiValueProperty();1460 System.Collections.Generic.IEnumerator<string> enumerator = Enumerable.Where<string>((System.Collections.Generic.IEnumerable<string>)multiValueProperty, (Func<string, bool>)((string s) => !CS_0024_003C_003E8__locals1.mvpOld.Contains(s))).GetEnumerator();1461 try1462 {1463 while (((System.Collections.IEnumerator)enumerator).MoveNext())1464 {1465 string current = enumerator.Current;1466 multiValueProperty2.Add(current);1467 }1468 }1469 finally1470 {1471 if (num < 0)1472 {1473 ((System.IDisposable)enumerator)?.Dispose();1474 }1475 }1476 if (multiValueProperty2.Count != 0)1477 {1478 ISqlFormatter sqlFormatter = session.SqlFormatter();1479 IDbSession dbSession = session.Resolve<IDbSession>();1480 string text = (entity.IsLoaded ? (" and " + sqlFormatter.UidComparison("UID_Person", entity.GetValue("UID_Person"), CompareOperator.NotEqual)) : "");1481 string systemIdentifier = session.Database().SystemIdentifier;1482 global::_003C_003Ey__InlineArray2<object> buffer = default(global::_003C_003Ey__InlineArray2<object>);1483 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray2<object>, object>(ref buffer, 0) = sqlFormatter.FormatValue(((object)multiValueProperty2).ToString(), ValType.String);1484 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray2<object>, object>(ref buffer, 1) = text;1485 string sqlStatement = SqlStrings.Format(systemIdentifier, "Person_UniqueAuthentifierLogins", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray2<object>, object>(in buffer, 2));1486 val = dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false).GetAwaiter();1487 if (!val.IsCompleted)1488 {1489 num = (_003C_003E1__state = 0);1490 _003C_003Eu__1 = val;1491 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003C_CheckUniqueAuthentifierLogins_003Ed__55>(ref val, ref this);1492 return;1493 }1494 goto IL_01d3;1495 }1496 goto end_IL_0007;1497 IL_01d3:1498 IDataReader result = (IDataReader)(object)val.GetResult();1499 try1500 {1501 if (result.Read())1502 {1503 throw new ViException(2133415, ExceptionRelevance.EndUser, ((IDataRecord)result).GetString(1), ((IDataRecord)result).GetString(2));1504 }1505 }1506 finally1507 {1508 if (num < 0)1509 {1510 ((System.IDisposable)result)?.Dispose();1511 }1512 }1513 end_IL_0007:;1514 }1515 catch (System.Exception exception)1516 {1517 _003C_003E1__state = -2;1518 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1519 return;1520 }1521 _003C_003E1__state = -2;1522 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1523 }15241525 [DebuggerHidden]1526 private void SetStateMachine(IAsyncStateMachine stateMachine)1527 {1528 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1529 }1530 }15311532 [StructLayout((LayoutKind)3)]1533 [CompilerGenerated]1534 private struct _003C_CreateAdminUser_003Ed__34 : IAsyncStateMachine1535 {1536 public int _003C_003E1__state;15371538 public AsyncTaskMethodBuilder _003C_003Et__builder;15391540 public ISession session;15411542 public CancellationToken ct;15431544 public IEntity entity;15451546 private ISqlFormatter _003CfSql_003E5__2;15471548 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;15491550 private ConfiguredTaskAwaiter<int> _003C_003Eu__2;15511552 private void MoveNext()1553 {1554 //IL_00b5: Unknown result type (might be due to invalid IL or missing references)1555 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)1556 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)1557 //IL_021c: Unknown result type (might be due to invalid IL or missing references)1558 //IL_0221: Unknown result type (might be due to invalid IL or missing references)1559 //IL_0229: Unknown result type (might be due to invalid IL or missing references)1560 //IL_0162: Unknown result type (might be due to invalid IL or missing references)1561 //IL_01d6: Unknown result type (might be due to invalid IL or missing references)1562 //IL_01e1: Unknown result type (might be due to invalid IL or missing references)1563 //IL_01e6: Unknown result type (might be due to invalid IL or missing references)1564 //IL_01ea: Unknown result type (might be due to invalid IL or missing references)1565 //IL_01ef: Unknown result type (might be due to invalid IL or missing references)1566 //IL_006c: Unknown result type (might be due to invalid IL or missing references)1567 //IL_0077: Unknown result type (might be due to invalid IL or missing references)1568 //IL_007c: Unknown result type (might be due to invalid IL or missing references)1569 //IL_0080: Unknown result type (might be due to invalid IL or missing references)1570 //IL_0085: Unknown result type (might be due to invalid IL or missing references)1571 //IL_0204: Unknown result type (might be due to invalid IL or missing references)1572 //IL_0206: Unknown result type (might be due to invalid IL or missing references)1573 //IL_009a: Unknown result type (might be due to invalid IL or missing references)1574 //IL_009c: Unknown result type (might be due to invalid IL or missing references)1575 int num = _003C_003E1__state;1576 try1577 {1578 ConfiguredTaskAwaiter<int> val;1579 ConfiguredTaskAwaiter<bool> val2;1580 if (num != 0)1581 {1582 if (num == 1)1583 {1584 val = _003C_003Eu__2;1585 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<int>);1586 num = (_003C_003E1__state = -1);1587 goto IL_0238;1588 }1589 if (!session.User().IsDialogAdmin)1590 {1591 throw new ViException(2133291, ExceptionRelevance.EndUser);1592 }1593 _003CfSql_003E5__2 = session.SqlFormatter();1594 string whereclause = _003CfSql_003E5__2.UidComparison("UID_AERole", "QER-AEROLE-AEADMIN");1595 val2 = session.Source().ExistsAsync("PersonInAERole", whereclause, ct).ConfigureAwait(false)1596 .GetAwaiter();1597 if (!val2.IsCompleted)1598 {1599 num = (_003C_003E1__state = 0);1600 _003C_003Eu__1 = val2;1601 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_CreateAdminUser_003Ed__34>(ref val2, ref this);1602 return;1603 }1604 }1605 else1606 {1607 val2 = _003C_003Eu__1;1608 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);1609 num = (_003C_003E1__state = -1);1610 }1611 if (val2.GetResult())1612 {1613 throw new ViException(2133292, ExceptionRelevance.EndUser);1614 }1615 IDbSession dbSession = session.Resolve<IDbSession>();1616 global::_003C_003Ey__InlineArray4<object> buffer = default(global::_003C_003Ey__InlineArray4<object>);1617 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 0) = _003CfSql_003E5__2.FormatUidValue(entity.GetValue("UID_Person").String);1618 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 1) = _003CfSql_003E5__2.FormatValue(((IIdentity)session.User()).Name, ValType.String, forUpdate: true);1619 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 2) = _003CfSql_003E5__2.FormatValue(QERHelper.GetServerTime(session, ct), ValType.Date, forUpdate: true);1620 global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 3) = _003CfSql_003E5__2.FormatUidValue(DbObjectKey.GetObjectKey("PersonInAERole", "UID_AERole", "QER-AEROLE-AEADMIN", "UID_Person", entity.GetValue("UID_Person").String).ToXmlString());1621 val = DbSessionExtensions.SqlExecuteNonQueryInContextAsync(statement: string.Format("insert into PersonInAERole ( UID_Person, UID_AERole, XOrigin, XUserInserted, XUserUpdated, XDateInserted, XDateUpdated, XObjectKey ) values ( {0}, 'QER-AEROLE-AEADMIN', 1, {1}, {1}, {2}, {2}, {3} )", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray4<object>, object>(in buffer, 4)), dbSession: dbSession, session: session, cancellationToken: ct).ConfigureAwait(false).GetAwaiter();1622 if (!val.IsCompleted)1623 {1624 num = (_003C_003E1__state = 1);1625 _003C_003Eu__2 = val;1626 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<int>, _003C_CreateAdminUser_003Ed__34>(ref val, ref this);1627 return;1628 }1629 goto IL_0238;1630 IL_0238:1631 val.GetResult();1632 session.Variables.Remove("QER.Customizer.Person.AdminUserExists");1633 }1634 catch (System.Exception exception)1635 {1636 _003C_003E1__state = -2;1637 _003CfSql_003E5__2 = null;1638 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1639 return;1640 }1641 _003C_003E1__state = -2;1642 _003CfSql_003E5__2 = null;1643 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1644 }16451646 [DebuggerHidden]1647 private void SetStateMachine(IAsyncStateMachine stateMachine)1648 {1649 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1650 }1651 }16521653 [StructLayout((LayoutKind)3)]1654 [CompilerGenerated]1655 private struct _003C_CreateCartItem_003Ed__16 : IAsyncStateMachine1656 {1657 public int _003C_003E1__state;16581659 public AsyncTaskMethodBuilder _003C_003Et__builder;16601661 public ISession session;16621663 public CancellationToken ct;16641665 public IEntity ePerson;16661667 public IEntity ePattern;16681669 public Func<IEntity, IEntity, bool> createCallback;16701671 public IUnitOfWork uoWork;16721673 private IEntity _003CdbShoppingCartItem_003E5__2;16741675 private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__1;16761677 private ConfiguredValueTaskAwaiter<ApplyResult> _003C_003Eu__2;16781679 private ConfiguredTaskAwaiter _003C_003Eu__3;16801681 private void MoveNext()1682 {1683 //IL_007d: Unknown result type (might be due to invalid IL or missing references)1684 //IL_0082: Unknown result type (might be due to invalid IL or missing references)1685 //IL_0089: Unknown result type (might be due to invalid IL or missing references)1686 //IL_0110: Unknown result type (might be due to invalid IL or missing references)1687 //IL_0115: Unknown result type (might be due to invalid IL or missing references)1688 //IL_011d: Unknown result type (might be due to invalid IL or missing references)1689 //IL_019d: Unknown result type (might be due to invalid IL or missing references)1690 //IL_01a2: Unknown result type (might be due to invalid IL or missing references)1691 //IL_01aa: Unknown result type (might be due to invalid IL or missing references)1692 //IL_022a: Unknown result type (might be due to invalid IL or missing references)1693 //IL_022f: Unknown result type (might be due to invalid IL or missing references)1694 //IL_0237: Unknown result type (might be due to invalid IL or missing references)1695 //IL_02c1: Unknown result type (might be due to invalid IL or missing references)1696 //IL_02c6: Unknown result type (might be due to invalid IL or missing references)1697 //IL_02ce: Unknown result type (might be due to invalid IL or missing references)1698 //IL_035e: Unknown result type (might be due to invalid IL or missing references)1699 //IL_0363: Unknown result type (might be due to invalid IL or missing references)1700 //IL_036b: Unknown result type (might be due to invalid IL or missing references)1701 //IL_0037: Unknown result type (might be due to invalid IL or missing references)1702 //IL_0042: Unknown result type (might be due to invalid IL or missing references)1703 //IL_0047: Unknown result type (might be due to invalid IL or missing references)1704 //IL_004a: Unknown result type (might be due to invalid IL or missing references)1705 //IL_004f: Unknown result type (might be due to invalid IL or missing references)1706 //IL_00c3: Unknown result type (might be due to invalid IL or missing references)1707 //IL_00d2: Unknown result type (might be due to invalid IL or missing references)1708 //IL_00d7: Unknown result type (might be due to invalid IL or missing references)1709 //IL_00db: Unknown result type (might be due to invalid IL or missing references)1710 //IL_00e0: Unknown result type (might be due to invalid IL or missing references)1711 //IL_0150: Unknown result type (might be due to invalid IL or missing references)1712 //IL_015f: Unknown result type (might be due to invalid IL or missing references)1713 //IL_0164: Unknown result type (might be due to invalid IL or missing references)1714 //IL_0168: Unknown result type (might be due to invalid IL or missing references)1715 //IL_016d: Unknown result type (might be due to invalid IL or missing references)1716 //IL_01dd: Unknown result type (might be due to invalid IL or missing references)1717 //IL_01ec: Unknown result type (might be due to invalid IL or missing references)1718 //IL_01f1: Unknown result type (might be due to invalid IL or missing references)1719 //IL_01f5: Unknown result type (might be due to invalid IL or missing references)1720 //IL_01fa: Unknown result type (might be due to invalid IL or missing references)1721 //IL_0274: Unknown result type (might be due to invalid IL or missing references)1722 //IL_0283: Unknown result type (might be due to invalid IL or missing references)1723 //IL_0288: Unknown result type (might be due to invalid IL or missing references)1724 //IL_028c: Unknown result type (might be due to invalid IL or missing references)1725 //IL_0291: Unknown result type (might be due to invalid IL or missing references)1726 //IL_0063: Unknown result type (might be due to invalid IL or missing references)1727 //IL_0064: Unknown result type (might be due to invalid IL or missing references)1728 //IL_00f5: Unknown result type (might be due to invalid IL or missing references)1729 //IL_00f7: Unknown result type (might be due to invalid IL or missing references)1730 //IL_0182: Unknown result type (might be due to invalid IL or missing references)1731 //IL_0184: Unknown result type (might be due to invalid IL or missing references)1732 //IL_020f: Unknown result type (might be due to invalid IL or missing references)1733 //IL_0211: Unknown result type (might be due to invalid IL or missing references)1734 //IL_02a6: Unknown result type (might be due to invalid IL or missing references)1735 //IL_02a8: Unknown result type (might be due to invalid IL or missing references)1736 //IL_0318: Unknown result type (might be due to invalid IL or missing references)1737 //IL_0323: Unknown result type (might be due to invalid IL or missing references)1738 //IL_0328: Unknown result type (might be due to invalid IL or missing references)1739 //IL_032c: Unknown result type (might be due to invalid IL or missing references)1740 //IL_0331: Unknown result type (might be due to invalid IL or missing references)1741 //IL_0346: Unknown result type (might be due to invalid IL or missing references)1742 //IL_0348: Unknown result type (might be due to invalid IL or missing references)1743 int num = _003C_003E1__state;1744 try1745 {1746 ConfiguredTaskAwaiter<IEntity> val3;1747 ConfiguredValueTaskAwaiter<ApplyResult> val2;1748 ConfiguredTaskAwaiter val;1749 IEntity result;1750 switch (num)1751 {1752 default:1753 val3 = session.Source().CreateNewAsync("ShoppingCartItem", EntityCreationType.DelayedLogic, ct).ConfigureAwait(false)1754 .GetAwaiter();1755 if (!val3.IsCompleted)1756 {1757 num = (_003C_003E1__state = 0);1758 _003C_003Eu__1 = val3;1759 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003C_CreateCartItem_003Ed__16>(ref val3, ref this);1760 return;1761 }1762 goto IL_0098;1763 case 0:1764 val3 = _003C_003Eu__1;1765 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1766 num = (_003C_003E1__state = -1);1767 goto IL_0098;1768 case 1:1769 val2 = _003C_003Eu__2;1770 _003C_003Eu__2 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1771 num = (_003C_003E1__state = -1);1772 goto IL_012c;1773 case 2:1774 val2 = _003C_003Eu__2;1775 _003C_003Eu__2 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1776 num = (_003C_003E1__state = -1);1777 goto IL_01b9;1778 case 3:1779 val2 = _003C_003Eu__2;1780 _003C_003Eu__2 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1781 num = (_003C_003E1__state = -1);1782 goto IL_0246;1783 case 4:1784 val2 = _003C_003Eu__2;1785 _003C_003Eu__2 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1786 num = (_003C_003E1__state = -1);1787 goto IL_02dd;1788 case 5:1789 {1790 val = _003C_003Eu__3;1791 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);1792 num = (_003C_003E1__state = -1);1793 break;1794 }1795 IL_01b9:1796 val2.GetResult();1797 val2 = _003CdbShoppingCartItem_003E5__2.PutValueAsync("UID_AccProduct", ePattern.GetValue<string>("UID_AccProduct"), ct).ConfigureAwait(false).GetAwaiter();1798 if (!val2.IsCompleted)1799 {1800 num = (_003C_003E1__state = 3);1801 _003C_003Eu__2 = val2;1802 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003C_CreateCartItem_003Ed__16>(ref val2, ref this);1803 return;1804 }1805 goto IL_0246;1806 IL_0098:1807 result = val3.GetResult();1808 _003CdbShoppingCartItem_003E5__2 = result;1809 val2 = _003CdbShoppingCartItem_003E5__2.PutValueAsync("UID_PersonInserted", ePerson.GetValue<string>("UID_Person"), ct).ConfigureAwait(false).GetAwaiter();1810 if (!val2.IsCompleted)1811 {1812 num = (_003C_003E1__state = 1);1813 _003C_003Eu__2 = val2;1814 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003C_CreateCartItem_003Ed__16>(ref val2, ref this);1815 return;1816 }1817 goto IL_012c;1818 IL_02dd:1819 val2.GetResult();1820 if (createCallback == null || !createCallback.Invoke(_003CdbShoppingCartItem_003E5__2, ePattern))1821 {1822 ConfiguredTaskAwaitable val4 = uoWork.PutAsync(_003CdbShoppingCartItem_003E5__2, ct).ConfigureAwait(false);1823 val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1824 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1825 {1826 num = (_003C_003E1__state = 5);1827 _003C_003Eu__3 = val;1828 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_CreateCartItem_003Ed__16>(ref val, ref this);1829 return;1830 }1831 break;1832 }1833 goto end_IL_0007;1834 IL_012c:1835 val2.GetResult();1836 val2 = _003CdbShoppingCartItem_003E5__2.PutValueAsync("UID_PersonOrdered", ePerson.GetValue<string>("UID_Person"), ct).ConfigureAwait(false).GetAwaiter();1837 if (!val2.IsCompleted)1838 {1839 num = (_003C_003E1__state = 2);1840 _003C_003Eu__2 = val2;1841 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003C_CreateCartItem_003Ed__16>(ref val2, ref this);1842 return;1843 }1844 goto IL_01b9;1845 IL_0246:1846 val2.GetResult();1847 val2 = _003CdbShoppingCartItem_003E5__2.PutValueAsync("Quantity", ePattern.GetValue("Quantity").Double, ct).ConfigureAwait(false).GetAwaiter();1848 if (!val2.IsCompleted)1849 {1850 num = (_003C_003E1__state = 4);1851 _003C_003Eu__2 = val2;1852 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003C_CreateCartItem_003Ed__16>(ref val2, ref this);1853 return;1854 }1855 goto IL_02dd;1856 }1857 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1858 end_IL_0007:;1859 }1860 catch (System.Exception exception)1861 {1862 _003C_003E1__state = -2;1863 _003CdbShoppingCartItem_003E5__2 = null;1864 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1865 return;1866 }1867 _003C_003E1__state = -2;1868 _003CdbShoppingCartItem_003E5__2 = null;1869 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1870 }18711872 [DebuggerHidden]1873 private void SetStateMachine(IAsyncStateMachine stateMachine)1874 {1875 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1876 }1877 }18781879 [StructLayout((LayoutKind)3)]1880 [CompilerGenerated]1881 private struct _003C_CreatePassCode_003Ed__45 : IAsyncStateMachine1882 {1883 public int _003C_003E1__state;18841885 public AsyncTaskMethodBuilder<string> _003C_003Et__builder;18861887 public IEntity entity;18881889 public int hoursValid;18901891 public ISession session;18921893 public CancellationToken ct;18941895 private IPasswordManager _003CpolManager_003E5__2;18961897 private string _003Cpwd_003E5__3;18981899 private System.DateTime _003CvalidUntil_003E5__4;19001901 private ConfiguredTaskAwaiter<TryResult<string>> _003C_003Eu__1;19021903 private ConfiguredTaskAwaiter<string> _003C_003Eu__2;19041905 private ConfiguredTaskAwaiter<PasswordPolicy> _003C_003Eu__3;19061907 private ConfiguredTaskAwaiter<SecureString> _003C_003Eu__4;19081909 private ConfiguredValueTaskAwaiter<ApplyResult> _003C_003Eu__5;19101911 private void MoveNext()1912 {1913 //IL_0103: Unknown result type (might be due to invalid IL or missing references)1914 //IL_0108: Unknown result type (might be due to invalid IL or missing references)1915 //IL_0110: Unknown result type (might be due to invalid IL or missing references)1916 //IL_018b: Unknown result type (might be due to invalid IL or missing references)1917 //IL_0190: Unknown result type (might be due to invalid IL or missing references)1918 //IL_0198: Unknown result type (might be due to invalid IL or missing references)1919 //IL_0213: Unknown result type (might be due to invalid IL or missing references)1920 //IL_0218: Unknown result type (might be due to invalid IL or missing references)1921 //IL_0220: Unknown result type (might be due to invalid IL or missing references)1922 //IL_0286: Unknown result type (might be due to invalid IL or missing references)1923 //IL_028b: Unknown result type (might be due to invalid IL or missing references)1924 //IL_0293: Unknown result type (might be due to invalid IL or missing references)1925 //IL_036a: Unknown result type (might be due to invalid IL or missing references)1926 //IL_036f: Unknown result type (might be due to invalid IL or missing references)1927 //IL_0377: Unknown result type (might be due to invalid IL or missing references)1928 //IL_03ef: Unknown result type (might be due to invalid IL or missing references)1929 //IL_03f4: Unknown result type (might be due to invalid IL or missing references)1930 //IL_03fc: Unknown result type (might be due to invalid IL or missing references)1931 //IL_023d: Unknown result type (might be due to invalid IL or missing references)1932 //IL_0248: Unknown result type (might be due to invalid IL or missing references)1933 //IL_024d: Unknown result type (might be due to invalid IL or missing references)1934 //IL_0251: Unknown result type (might be due to invalid IL or missing references)1935 //IL_0256: Unknown result type (might be due to invalid IL or missing references)1936 //IL_02bf: Unknown result type (might be due to invalid IL or missing references)1937 //IL_031d: Unknown result type (might be due to invalid IL or missing references)1938 //IL_032c: Unknown result type (might be due to invalid IL or missing references)1939 //IL_0331: Unknown result type (might be due to invalid IL or missing references)1940 //IL_0335: Unknown result type (might be due to invalid IL or missing references)1941 //IL_033a: Unknown result type (might be due to invalid IL or missing references)1942 //IL_03a5: Unknown result type (might be due to invalid IL or missing references)1943 //IL_03b4: Unknown result type (might be due to invalid IL or missing references)1944 //IL_03b9: Unknown result type (might be due to invalid IL or missing references)1945 //IL_03bd: Unknown result type (might be due to invalid IL or missing references)1946 //IL_03c2: Unknown result type (might be due to invalid IL or missing references)1947 //IL_0142: Unknown result type (might be due to invalid IL or missing references)1948 //IL_014d: Unknown result type (might be due to invalid IL or missing references)1949 //IL_0152: Unknown result type (might be due to invalid IL or missing references)1950 //IL_0156: Unknown result type (might be due to invalid IL or missing references)1951 //IL_015b: Unknown result type (might be due to invalid IL or missing references)1952 //IL_026b: Unknown result type (might be due to invalid IL or missing references)1953 //IL_026d: Unknown result type (might be due to invalid IL or missing references)1954 //IL_034f: Unknown result type (might be due to invalid IL or missing references)1955 //IL_0351: Unknown result type (might be due to invalid IL or missing references)1956 //IL_03d7: Unknown result type (might be due to invalid IL or missing references)1957 //IL_03d9: Unknown result type (might be due to invalid IL or missing references)1958 //IL_005b: Unknown result type (might be due to invalid IL or missing references)1959 //IL_0170: Unknown result type (might be due to invalid IL or missing references)1960 //IL_0172: Unknown result type (might be due to invalid IL or missing references)1961 //IL_01ca: Unknown result type (might be due to invalid IL or missing references)1962 //IL_01d5: Unknown result type (might be due to invalid IL or missing references)1963 //IL_01da: Unknown result type (might be due to invalid IL or missing references)1964 //IL_01de: Unknown result type (might be due to invalid IL or missing references)1965 //IL_01e3: Unknown result type (might be due to invalid IL or missing references)1966 //IL_01bc: Unknown result type (might be due to invalid IL or missing references)1967 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)1968 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)1969 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)1970 //IL_00ce: Unknown result type (might be due to invalid IL or missing references)1971 //IL_00d3: Unknown result type (might be due to invalid IL or missing references)1972 //IL_007f: Unknown result type (might be due to invalid IL or missing references)1973 //IL_01f8: Unknown result type (might be due to invalid IL or missing references)1974 //IL_01fa: Unknown result type (might be due to invalid IL or missing references)1975 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)1976 //IL_00ea: Unknown result type (might be due to invalid IL or missing references)1977 int num = _003C_003E1__state;1978 string result5;1979 try1980 {1981 ConfiguredTaskAwaiter<TryResult<string>> val5;1982 ConfiguredTaskAwaiter<string> val4;1983 ConfiguredTaskAwaiter<PasswordPolicy> val3;1984 ConfiguredTaskAwaiter<SecureString> val2;1985 ConfiguredValueTaskAwaiter<ApplyResult> val;1986 string result;1987 TryResult<string> result2;1988 PasswordPolicy result3;1989 SecureString result4;1990 string text;1991 string value;1992 switch (num)1993 {1994 default:1995 {1996 if (!entity.Columns["PassCode"].CanEdit)1997 {1998 throw new ViException(2133446, ExceptionRelevance.EndUser);1999 }2000 if (hoursValid < 1)2001 {2002 throw new ArgumentOutOfRangeException("hoursValid");2003 }2004 _003CpolManager_003E5__2 = session.Resolve<IPasswordManager>();2005 if (_003CpolManager_003E5__2 == null)2006 {2007 throw new ArgumentException("IPasswordManager not available in session");2008 }2009 Query query = Query.From("QBMObjectHasPwdPolicy").Where("UID_DialogColumn = 'QER-4EB32EFE855B48F2899BFAF92167B51C' and ObjectKeyElement = '<Key><T>DialogTable</T><P>QER-T-Person</P></Key>'").Select("UID_QBMPwdPolicy");2010 val5 = session.Source().TryGetSingleValueAsync<string>(query, ct).ConfigureAwait(false)2011 .GetAwaiter();2012 if (!val5.IsCompleted)2013 {2014 num = (_003C_003E1__state = 0);2015 _003C_003Eu__1 = val5;2016 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<TryResult<string>>, _003C_CreatePassCode_003Ed__45>(ref val5, ref this);2017 return;2018 }2019 goto IL_011f;2020 }2021 case 0:2022 val5 = _003C_003Eu__1;2023 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<TryResult<string>>);2024 num = (_003C_003E1__state = -1);2025 goto IL_011f;2026 case 1:2027 val4 = _003C_003Eu__2;2028 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);2029 num = (_003C_003E1__state = -1);2030 goto IL_01a7;2031 case 2:2032 val3 = _003C_003Eu__3;2033 _003C_003Eu__3 = default(ConfiguredTaskAwaiter<PasswordPolicy>);2034 num = (_003C_003E1__state = -1);2035 goto IL_022f;2036 case 3:2037 val2 = _003C_003Eu__4;2038 _003C_003Eu__4 = default(ConfiguredTaskAwaiter<SecureString>);2039 num = (_003C_003E1__state = -1);2040 goto IL_02a2;2041 case 4:2042 val = _003C_003Eu__5;2043 _003C_003Eu__5 = default(ConfiguredValueTaskAwaiter<ApplyResult>);2044 num = (_003C_003E1__state = -1);2045 goto IL_0386;2046 case 5:2047 {2048 val = _003C_003Eu__5;2049 _003C_003Eu__5 = default(ConfiguredValueTaskAwaiter<ApplyResult>);2050 num = (_003C_003E1__state = -1);2051 break;2052 }2053 IL_01af:2054 if (string.IsNullOrEmpty(result))2055 {2056 throw new ArgumentException("No password policy is configured.");2057 }2058 val3 = _003CpolManager_003E5__2.GetPolicyAsync(result, ct).ConfigureAwait(false).GetAwaiter();2059 if (!val3.IsCompleted)2060 {2061 num = (_003C_003E1__state = 2);2062 _003C_003Eu__3 = val3;2063 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<PasswordPolicy>, _003C_CreatePassCode_003Ed__45>(ref val3, ref this);2064 return;2065 }2066 goto IL_022f;2067 IL_011f:2068 result2 = val5.GetResult();2069 if (result2.Success)2070 {2071 result = result2.Result;2072 goto IL_01af;2073 }2074 val4 = _003CpolManager_003E5__2.GetDefaultPolicyUidAsync(ct).ConfigureAwait(false).GetAwaiter();2075 if (!val4.IsCompleted)2076 {2077 num = (_003C_003E1__state = 1);2078 _003C_003Eu__2 = val4;2079 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_CreatePassCode_003Ed__45>(ref val4, ref this);2080 return;2081 }2082 goto IL_01a7;2083 IL_022f:2084 result3 = val3.GetResult();2085 val2 = result3.CreatePasswordAsync(result3.RecommendedLen, ct).ConfigureAwait(false).GetAwaiter();2086 if (!val2.IsCompleted)2087 {2088 num = (_003C_003E1__state = 3);2089 _003C_003Eu__4 = val2;2090 _003C_003Et__builder.AwaitUns
…