QER.Customizer/QER.Customizer/PersonWantsOrg.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 3.86 MBcompact pageexcerpt 2 lines
Source-derived context
classes PersonWantsOrg, MP, WellKnownDecisionRules, DecisionHistoryArgs; methods MoveNext, SetStateMachine, _003C_GetUIDPwoState_003Eb__0, _003CInitializeMNRelationKeys_003Eb__0, _003CBaseTreeAssign_003Eb__0, Abort; references AccProduct, BasetreeAssign, BaseTreeHasObject, ComplianceRule, Delegation, Department; markers reads entity values, writes entity values, 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.ComponentModel;5using System.Data;6using System.Data.Common;7using System.Diagnostics;8using System.Globalization;9using System.Linq;10using System.Runtime.CompilerServices;11using System.Runtime.ExceptionServices;12using System.Runtime.InteropServices;13using System.Text;14using System.Threading;15using System.Threading.Tasks;16using VI.Base;17using VI.DB;18using VI.DB.DataAccess;19using VI.DB.Entities;20using VI.DB.Entities.Transport;21using VI.DB.MetaData;22using VI.DB.Sync;2324namespace QER.Customizer;2526public class PersonWantsOrg : CacheBasedEntityLogic27{28 private class MP29 {30 public string? Person;3132 public string? Message;3334 public string? State;3536 public string? PersonSub;3738 public bool Decision;3940 public bool AdminContext;4142 public int Number;4344 public System.DateTime Date;4546 public string? Justification;4748 public int Sublevel;49 }5051 private enum PwoOrderType52 {53 Product,54 Assignment,55 MAllAssignment56 }5758 private static class WellKnownDecisionRules59 {60 [Description("Manager of cost center given in the request")]61 public static string PP = "QER-PWODecisionRule-PP";6263 [Description("Obtain a response (internal only)")]64 public static string QP = "QER-PWODecisionRule-QP";6566 [Description("Self service")]67 public static string SB = "QER-PWODecisionRule-SB";6869 [Description("Exception approvers for violated rules")]70 public static string OC = "CPL-PWODecisionRule-OC";7172 [Description("Exception approver for worst rule violation")]73 public static string OH = "CPL-PWODecisionRule-OH";74 }7576 internal class DecisionHistoryArgs77 {78 [field: CompilerGenerated]79 public string? UIDDecisionRule80 {81 [CompilerGenerated]82 get;83 [CompilerGenerated]84 set;85 }8687 [field: CompilerGenerated]88 public string? DecisionStep89 {90 [CompilerGenerated]91 get;92 [CompilerGenerated]93 set;94 }9596 [field: CompilerGenerated]97 public string Person98 {99 [CompilerGenerated]100 get;101 [CompilerGenerated]102 set;103 }104105 [field: CompilerGenerated]106 public System.DateTime Date107 {108 [CompilerGenerated]109 get;110 [CompilerGenerated]111 set;112 }113114 [field: CompilerGenerated]115 public string? Text116 {117 [CompilerGenerated]118 get;119 [CompilerGenerated]120 set;121 }122123 [field: CompilerGenerated]124 public bool SystemDecision125 {126 [CompilerGenerated]127 get;128 [CompilerGenerated]129 set;130 }131132 [field: CompilerGenerated]133 public string? UIDPersonRelated134 {135 [CompilerGenerated]136 get;137 [CompilerGenerated]138 set;139 }140141 [field: CompilerGenerated]142 public int DecisionLevel143 {144 [CompilerGenerated]145 get;146 [CompilerGenerated]147 set;148 }149150 [field: CompilerGenerated]151 public bool IsToHideInHistory152 {153 [CompilerGenerated]154 get;155 [CompilerGenerated]156 set;157 }158159 [field: CompilerGenerated]160 public string? UIDComplianceRule161 {162 [CompilerGenerated]163 get;164 [CompilerGenerated]165 set;166 }167168 [field: CompilerGenerated]169 public string? UIDJustification170 {171 [CompilerGenerated]172 get;173 [CompilerGenerated]174 set;175 }176177 [field: CompilerGenerated]178 public bool IsFromDelegation179 {180 [CompilerGenerated]181 get;182 [CompilerGenerated]183 set;184 }185186 [field: CompilerGenerated]187 public int RulerLevel188 {189 [CompilerGenerated]190 get;191 [CompilerGenerated]192 set;193 }194195 public DecisionHistoryArgs(IEntity entity)196 {197 Date = entity.GetValue<System.DateTime>("DateHead");198 Person = entity.GetValue<string>("UID_PersonHead");199 Text = entity.GetValue<string>("ReasonHead");200 DecisionLevel = entity.GetValue<int>("DecisionLevel[o]");201 UIDJustification = entity.GetValue<string>("UID_QERJustification");202 }203 }204205 [StructLayout((LayoutKind)3)]206 [CompilerGenerated]207 private struct _003C_003C_002Dctor_003Eb__5_10_003Ed : IAsyncStateMachine208 {209 public int _003C_003E1__state;210211 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;212213 public PersonWantsOrg _003C_003E4__this;214215 public ISession s;216217 public IEntity e;218219 public IEntityWalker w;220221 public System.DateTime v;222223 public CancellationToken ct;224225 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;226227 private void MoveNext()228 {229 //IL_0075: Unknown result type (might be due to invalid IL or missing references)230 //IL_007a: Unknown result type (might be due to invalid IL or missing references)231 //IL_0081: Unknown result type (might be due to invalid IL or missing references)232 //IL_0031: Unknown result type (might be due to invalid IL or missing references)233 //IL_003c: Unknown result type (might be due to invalid IL or missing references)234 //IL_0041: Unknown result type (might be due to invalid IL or missing references)235 //IL_0045: Unknown result type (might be due to invalid IL or missing references)236 //IL_004a: Unknown result type (might be due to invalid IL or missing references)237 //IL_005e: Unknown result type (might be due to invalid IL or missing references)238 //IL_005f: Unknown result type (might be due to invalid IL or missing references)239 int num = _003C_003E1__state;240 PersonWantsOrg personWantsOrg = _003C_003E4__this;241 bool result;242 try243 {244 ConfiguredTaskAwaiter<bool> val;245 if (num != 0)246 {247 val = personWantsOrg._Check_ValidUntilValue(s, e, w, v, "ValidUntil", bValidFrom: true, ct).ConfigureAwait(false).GetAwaiter();248 if (!val.IsCompleted)249 {250 num = (_003C_003E1__state = 0);251 _003C_003Eu__1 = val;252 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_003C_002Dctor_003Eb__5_10_003Ed>(ref val, ref this);253 return;254 }255 }256 else257 {258 val = _003C_003Eu__1;259 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);260 num = (_003C_003E1__state = -1);261 }262 result = val.GetResult();263 }264 catch (System.Exception exception)265 {266 _003C_003E1__state = -2;267 _003C_003Et__builder.SetException(exception);268 return;269 }270 _003C_003E1__state = -2;271 _003C_003Et__builder.SetResult(result);272 }273274 [DebuggerHidden]275 private void SetStateMachine(IAsyncStateMachine stateMachine)276 {277 _003C_003Et__builder.SetStateMachine(stateMachine);278 }279 }280281 [StructLayout((LayoutKind)3)]282 [CompilerGenerated]283 private struct _003C_003C_002Dctor_003Eb__5_9_003Ed : IAsyncStateMachine284 {285 public int _003C_003E1__state;286287 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;288289 public PersonWantsOrg _003C_003E4__this;290291 public ISession s;292293 public IEntity e;294295 public IEntityWalker w;296297 public System.DateTime v;298299 public CancellationToken ct;300301 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;302303 private void MoveNext()304 {305 //IL_0075: Unknown result type (might be due to invalid IL or missing references)306 //IL_007a: Unknown result type (might be due to invalid IL or missing references)307 //IL_0081: Unknown result type (might be due to invalid IL or missing references)308 //IL_0031: Unknown result type (might be due to invalid IL or missing references)309 //IL_003c: Unknown result type (might be due to invalid IL or missing references)310 //IL_0041: Unknown result type (might be due to invalid IL or missing references)311 //IL_0045: Unknown result type (might be due to invalid IL or missing references)312 //IL_004a: Unknown result type (might be due to invalid IL or missing references)313 //IL_005e: Unknown result type (might be due to invalid IL or missing references)314 //IL_005f: Unknown result type (might be due to invalid IL or missing references)315 int num = _003C_003E1__state;316 PersonWantsOrg personWantsOrg = _003C_003E4__this;317 bool result;318 try319 {320 ConfiguredTaskAwaiter<bool> val;321 if (num != 0)322 {323 val = personWantsOrg._Check_ValidUntilValue(s, e, w, v, "ValidUntilProlongation", bValidFrom: false, ct).ConfigureAwait(false).GetAwaiter();324 if (!val.IsCompleted)325 {326 num = (_003C_003E1__state = 0);327 _003C_003Eu__1 = val;328 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_003C_002Dctor_003Eb__5_9_003Ed>(ref val, ref this);329 return;330 }331 }332 else333 {334 val = _003C_003Eu__1;335 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);336 num = (_003C_003E1__state = -1);337 }338 result = val.GetResult();339 }340 catch (System.Exception exception)341 {342 _003C_003E1__state = -2;343 _003C_003Et__builder.SetException(exception);344 return;345 }346 _003C_003E1__state = -2;347 _003C_003Et__builder.SetResult(result);348 }349350 [DebuggerHidden]351 private void SetStateMachine(IAsyncStateMachine stateMachine)352 {353 _003C_003Et__builder.SetStateMachine(stateMachine);354 }355 }356357 [CompilerGenerated]358 private sealed class _003C_003Ec__DisplayClass110_0359 {360 public string identPwOState;361362 internal ExpressionClause _003C_GetUIDPwoState_003Eb__0(IExpressionContext c)363 {364 return c.Column("Ident_PwOState") == identPwOState || c.Column("UID_PwOState") == identPwOState;365 }366 }367368 [CompilerGenerated]369 private sealed class _003C_003Ec__DisplayClass128_0370 {371 public DbObjectKey dbokOrg;372373 internal ExpressionClause _003CInitializeMNRelationKeys_003Eb__0(IExpressionContext c)374 {375 return c.Column("UID_Org") == dbokOrg.Keys[0];376 }377 }378379 [CompilerGenerated]380 private sealed class _003C_003Ec__DisplayClass93_0381 {382 public IMetaTable mTableProduct;383384 internal ExpressionClause _003CBaseTreeAssign_003Eb__0(IExpressionContext c)385 {386 return c.Column("UID_DialogTableElement") == mTableProduct.Uid;387 }388 }389390 [StructLayout((LayoutKind)3)]391 [CompilerGenerated]392 private struct _003CAbortOrder_OnSaving_003Ed__9 : IAsyncStateMachine393 {394 public int _003C_003E1__state;395396 public AsyncTaskMethodBuilder _003C_003Et__builder;397398 public IEntity entity;399400 public LogicReadWriteParameters parameter;401402 public CancellationToken ct;403404 public MP mp;405406 public PersonWantsOrg _003C_003E4__this;407408 private LogicParameter _003Clp_003E5__2;409410 private System.DateTime _003CdtServer_003E5__3;411412 private IEntity _003C_003E7__wrap3;413414 private ConfiguredTaskAwaiter<string> _003C_003Eu__1;415416 private ConfiguredTaskAwaiter _003C_003Eu__2;417418 private void MoveNext()419 {420 //IL_014c: Unknown result type (might be due to invalid IL or missing references)421 //IL_0151: Unknown result type (might be due to invalid IL or missing references)422 //IL_0158: Unknown result type (might be due to invalid IL or missing references)423 //IL_01d6: Unknown result type (might be due to invalid IL or missing references)424 //IL_01db: Unknown result type (might be due to invalid IL or missing references)425 //IL_01e3: Unknown result type (might be due to invalid IL or missing references)426 //IL_0246: Unknown result type (might be due to invalid IL or missing references)427 //IL_024b: Unknown result type (might be due to invalid IL or missing references)428 //IL_0253: Unknown result type (might be due to invalid IL or missing references)429 //IL_02eb: Unknown result type (might be due to invalid IL or missing references)430 //IL_02f0: Unknown result type (might be due to invalid IL or missing references)431 //IL_02f8: Unknown result type (might be due to invalid IL or missing references)432 //IL_0032: Unknown result type (might be due to invalid IL or missing references)433 //IL_004e: Unknown result type (might be due to invalid IL or missing references)434 //IL_0208: Unknown result type (might be due to invalid IL or missing references)435 //IL_020d: Unknown result type (might be due to invalid IL or missing references)436 //IL_0211: Unknown result type (might be due to invalid IL or missing references)437 //IL_0216: Unknown result type (might be due to invalid IL or missing references)438 //IL_02b0: Unknown result type (might be due to invalid IL or missing references)439 //IL_02b5: Unknown result type (might be due to invalid IL or missing references)440 //IL_02b9: Unknown result type (might be due to invalid IL or missing references)441 //IL_02be: Unknown result type (might be due to invalid IL or missing references)442 //IL_0198: Unknown result type (might be due to invalid IL or missing references)443 //IL_019d: Unknown result type (might be due to invalid IL or missing references)444 //IL_01a1: Unknown result type (might be due to invalid IL or missing references)445 //IL_01a6: Unknown result type (might be due to invalid IL or missing references)446 //IL_0110: Unknown result type (might be due to invalid IL or missing references)447 //IL_0115: Unknown result type (might be due to invalid IL or missing references)448 //IL_0119: Unknown result type (might be due to invalid IL or missing references)449 //IL_011e: Unknown result type (might be due to invalid IL or missing references)450 //IL_022b: Unknown result type (might be due to invalid IL or missing references)451 //IL_022d: Unknown result type (might be due to invalid IL or missing references)452 //IL_02d3: Unknown result type (might be due to invalid IL or missing references)453 //IL_02d5: Unknown result type (might be due to invalid IL or missing references)454 //IL_01bb: Unknown result type (might be due to invalid IL or missing references)455 //IL_01bd: Unknown result type (might be due to invalid IL or missing references)456 //IL_0132: Unknown result type (might be due to invalid IL or missing references)457 //IL_0133: Unknown result type (might be due to invalid IL or missing references)458 int num = _003C_003E1__state;459 PersonWantsOrg personWantsOrg = _003C_003E4__this;460 try461 {462 ConfiguredTaskAwaiter<string> val2;463 ConfiguredTaskAwaiter val;464 ConfiguredTaskAwaitable val3;465 string result;466 switch (num)467 {468 default:469 _003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);470 _003CdtServer_003E5__3 = QERHelper.GetServerTime(parameter.Session, ct);471 entity.SetValue("ReasonHead", mp.Message);472 entity.SetValue("UID_QERJustification", mp.Justification);473 entity.SetValue("DateHead", _003CdtServer_003E5__3);474 entity.SetValue("UID_PersonHead", string.Empty);475 entity.SetValue("DisplayPersonHead", string.Empty);476 if (!string.IsNullOrEmpty(mp.State))477 {478 _003C_003E7__wrap3 = entity;479 val2 = _GetUIDPwoState(_003Clp_003E5__2, mp.State).ConfigureAwait(false).GetAwaiter();480 if (!val2.IsCompleted)481 {482 num = (_003C_003E1__state = 0);483 _003C_003Eu__1 = val2;484 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003CAbortOrder_OnSaving_003Ed__9>(ref val2, ref this);485 return;486 }487 goto IL_0167;488 }489 goto IL_0187;490 case 0:491 val2 = _003C_003Eu__1;492 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<string>);493 num = (_003C_003E1__state = -1);494 goto IL_0167;495 case 1:496 val = _003C_003Eu__2;497 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);498 num = (_003C_003E1__state = -1);499 goto IL_01f2;500 case 2:501 val = _003C_003Eu__2;502 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);503 num = (_003C_003E1__state = -1);504 goto IL_0262;505 case 3:506 {507 val = _003C_003Eu__2;508 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);509 num = (_003C_003E1__state = -1);510 break;511 }512 IL_0262:513 ((ConfiguredTaskAwaiter)(ref val)).GetResult();514 val3 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Abort, new DecisionHistoryArgs(entity)515 {516 Date = _003CdtServer_003E5__3,517 Text = mp.Message,518 SystemDecision = mp.AdminContext519 }).ConfigureAwait(false);520 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();521 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)522 {523 num = (_003C_003E1__state = 3);524 _003C_003Eu__2 = val;525 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbortOrder_OnSaving_003Ed__9>(ref val, ref this);526 return;527 }528 break;529 IL_01f2:530 ((ConfiguredTaskAwaiter)(ref val)).GetResult();531 val3 = personWantsOrg._HandleFinishedOrder(_003Clp_003E5__2, bDecision: false, bChangeState: false).ConfigureAwait(false);532 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();533 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)534 {535 num = (_003C_003E1__state = 2);536 _003C_003Eu__2 = val;537 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbortOrder_OnSaving_003Ed__9>(ref val, ref this);538 return;539 }540 goto IL_0262;541 IL_0167:542 result = val2.GetResult();543 _003C_003E7__wrap3.SetValue("UID_PwOState", result);544 _003C_003E7__wrap3 = null;545 goto IL_0187;546 IL_0187:547 val3 = personWantsOrg.ChangeState(_003Clp_003E5__2, PwOFunction.AbortOrder).ConfigureAwait(false);548 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();549 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)550 {551 num = (_003C_003E1__state = 1);552 _003C_003Eu__2 = val;553 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbortOrder_OnSaving_003Ed__9>(ref val, ref this);554 return;555 }556 goto IL_01f2;557 }558 ((ConfiguredTaskAwaiter)(ref val)).GetResult();559 }560 catch (System.Exception exception)561 {562 _003C_003E1__state = -2;563 _003Clp_003E5__2 = null;564 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);565 return;566 }567 _003C_003E1__state = -2;568 _003Clp_003E5__2 = null;569 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();570 }571572 [DebuggerHidden]573 private void SetStateMachine(IAsyncStateMachine stateMachine)574 {575 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);576 }577 }578579 [StructLayout((LayoutKind)3)]580 [CompilerGenerated]581 private struct _003CAbort_OnSaving_003Ed__7 : IAsyncStateMachine582 {583 public int _003C_003E1__state;584585 public AsyncTaskMethodBuilder _003C_003Et__builder;586587 public IEntity entity;588589 public LogicReadWriteParameters parameter;590591 public CancellationToken ct;592593 public MP mp;594595 public PersonWantsOrg _003C_003E4__this;596597 private LogicParameter _003Clp_003E5__2;598599 private System.DateTime _003CdtServer_003E5__3;600601 private bool _003CbIsAssigned_003E5__4;602603 private IEntity _003C_003E7__wrap4;604605 private ConfiguredTaskAwaiter<string> _003C_003Eu__1;606607 private ConfiguredTaskAwaiter _003C_003Eu__2;608609 private void MoveNext()610 {611 //IL_016b: Unknown result type (might be due to invalid IL or missing references)612 //IL_0170: Unknown result type (might be due to invalid IL or missing references)613 //IL_0177: Unknown result type (might be due to invalid IL or missing references)614 //IL_0205: Unknown result type (might be due to invalid IL or missing references)615 //IL_020a: Unknown result type (might be due to invalid IL or missing references)616 //IL_0212: Unknown result type (might be due to invalid IL or missing references)617 //IL_0294: Unknown result type (might be due to invalid IL or missing references)618 //IL_0299: Unknown result type (might be due to invalid IL or missing references)619 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)620 //IL_0304: Unknown result type (might be due to invalid IL or missing references)621 //IL_0309: Unknown result type (might be due to invalid IL or missing references)622 //IL_0311: Unknown result type (might be due to invalid IL or missing references)623 //IL_03a9: Unknown result type (might be due to invalid IL or missing references)624 //IL_03ae: Unknown result type (might be due to invalid IL or missing references)625 //IL_03b6: Unknown result type (might be due to invalid IL or missing references)626 //IL_0036: Unknown result type (might be due to invalid IL or missing references)627 //IL_0052: Unknown result type (might be due to invalid IL or missing references)628 //IL_01c7: Unknown result type (might be due to invalid IL or missing references)629 //IL_01cc: Unknown result type (might be due to invalid IL or missing references)630 //IL_01d0: Unknown result type (might be due to invalid IL or missing references)631 //IL_01d5: Unknown result type (might be due to invalid IL or missing references)632 //IL_012f: Unknown result type (might be due to invalid IL or missing references)633 //IL_0134: Unknown result type (might be due to invalid IL or missing references)634 //IL_0138: Unknown result type (might be due to invalid IL or missing references)635 //IL_013d: Unknown result type (might be due to invalid IL or missing references)636 //IL_036e: Unknown result type (might be due to invalid IL or missing references)637 //IL_0373: Unknown result type (might be due to invalid IL or missing references)638 //IL_0377: Unknown result type (might be due to invalid IL or missing references)639 //IL_037c: Unknown result type (might be due to invalid IL or missing references)640 //IL_01ea: Unknown result type (might be due to invalid IL or missing references)641 //IL_01ec: Unknown result type (might be due to invalid IL or missing references)642 //IL_0151: Unknown result type (might be due to invalid IL or missing references)643 //IL_0152: Unknown result type (might be due to invalid IL or missing references)644 //IL_0391: Unknown result type (might be due to invalid IL or missing references)645 //IL_0393: Unknown result type (might be due to invalid IL or missing references)646 //IL_02c6: Unknown result type (might be due to invalid IL or missing references)647 //IL_02cb: Unknown result type (might be due to invalid IL or missing references)648 //IL_02cf: Unknown result type (might be due to invalid IL or missing references)649 //IL_02d4: Unknown result type (might be due to invalid IL or missing references)650 //IL_0256: Unknown result type (might be due to invalid IL or missing references)651 //IL_025b: Unknown result type (might be due to invalid IL or missing references)652 //IL_025f: Unknown result type (might be due to invalid IL or missing references)653 //IL_0264: Unknown result type (might be due to invalid IL or missing references)654 //IL_02e9: Unknown result type (might be due to invalid IL or missing references)655 //IL_02eb: Unknown result type (might be due to invalid IL or missing references)656 //IL_0279: Unknown result type (might be due to invalid IL or missing references)657 //IL_027b: Unknown result type (might be due to invalid IL or missing references)658 int num = _003C_003E1__state;659 PersonWantsOrg personWantsOrg = _003C_003E4__this;660 try661 {662 ConfiguredTaskAwaiter<string> val2;663 ConfiguredTaskAwaiter val;664 ConfiguredTaskAwaitable val3;665 string result;666 switch (num)667 {668 default:669 _003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);670 _003CdtServer_003E5__3 = QERHelper.GetServerTime(parameter.Session, ct);671 entity.SetValue("DateDeactivated", _003CdtServer_003E5__3);672 entity.SetValue("ReasonHead", mp.Message);673 entity.SetValue("UID_QERJustification", mp.Justification);674 entity.SetValue("DateHead", _003CdtServer_003E5__3);675 entity.SetValue("UID_PersonHead", string.Empty);676 entity.SetValue("DisplayPersonHead", string.Empty);677 if (!string.IsNullOrEmpty(mp.State))678 {679 _003C_003E7__wrap4 = entity;680 val2 = _GetUIDPwoState(_003Clp_003E5__2, mp.State).ConfigureAwait(false).GetAwaiter();681 if (!val2.IsCompleted)682 {683 num = (_003C_003E1__state = 0);684 _003C_003Eu__1 = val2;685 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003CAbort_OnSaving_003Ed__7>(ref val2, ref this);686 return;687 }688 goto IL_0186;689 }690 goto IL_01a6;691 case 0:692 val2 = _003C_003Eu__1;693 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<string>);694 num = (_003C_003E1__state = -1);695 goto IL_0186;696 case 1:697 val = _003C_003Eu__2;698 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);699 num = (_003C_003E1__state = -1);700 goto IL_0221;701 case 2:702 val = _003C_003Eu__2;703 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);704 num = (_003C_003E1__state = -1);705 goto IL_02b0;706 case 3:707 val = _003C_003Eu__2;708 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);709 num = (_003C_003E1__state = -1);710 goto IL_0320;711 case 4:712 {713 val = _003C_003Eu__2;714 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);715 num = (_003C_003E1__state = -1);716 break;717 }718 IL_02b0:719 ((ConfiguredTaskAwaiter)(ref val)).GetResult();720 goto IL_0327;721 IL_0327:722 val3 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Abort, new DecisionHistoryArgs(entity)723 {724 Date = _003CdtServer_003E5__3,725 Text = mp.Message,726 SystemDecision = mp.AdminContext727 }).ConfigureAwait(false);728 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();729 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)730 {731 num = (_003C_003E1__state = 4);732 _003C_003Eu__2 = val;733 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbort_OnSaving_003Ed__7>(ref val, ref this);734 return;735 }736 break;737 IL_0186:738 result = val2.GetResult();739 _003C_003E7__wrap4.SetValue("UID_PwOState", result);740 _003C_003E7__wrap4 = null;741 goto IL_01a6;742 IL_01a6:743 _003CbIsAssigned_003E5__4 = personWantsOrg.PwOState.IsAssigned;744 val3 = personWantsOrg.ChangeState(_003Clp_003E5__2, PwOFunction.Abort).ConfigureAwait(false);745 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();746 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)747 {748 num = (_003C_003E1__state = 1);749 _003C_003Eu__2 = val;750 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbort_OnSaving_003Ed__7>(ref val, ref this);751 return;752 }753 goto IL_0221;754 IL_0320:755 ((ConfiguredTaskAwaiter)(ref val)).GetResult();756 goto IL_0327;757 IL_0221:758 ((ConfiguredTaskAwaiter)(ref val)).GetResult();759 if (_003CbIsAssigned_003E5__4)760 {761 if (!string.IsNullOrEmpty(entity.GetValue<string>("ObjectKeyAssignment")))762 {763 val3 = _Assignment_Remove(_003Clp_003E5__2).ConfigureAwait(false);764 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();765 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)766 {767 num = (_003C_003E1__state = 2);768 _003C_003Eu__2 = val;769 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbort_OnSaving_003Ed__7>(ref val, ref this);770 return;771 }772 goto IL_02b0;773 }774 val3 = personWantsOrg._ObjectInITShopOrg_Remove(_003Clp_003E5__2).ConfigureAwait(false);775 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();776 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)777 {778 num = (_003C_003E1__state = 3);779 _003C_003Eu__2 = val;780 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAbort_OnSaving_003Ed__7>(ref val, ref this);781 return;782 }783 goto IL_0320;784 }785 goto IL_0327;786 }787 ((ConfiguredTaskAwaiter)(ref val)).GetResult();788 }789 catch (System.Exception exception)790 {791 _003C_003E1__state = -2;792 _003Clp_003E5__2 = null;793 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);794 return;795 }796 _003C_003E1__state = -2;797 _003Clp_003E5__2 = null;798 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();799 }800801 [DebuggerHidden]802 private void SetStateMachine(IAsyncStateMachine stateMachine)803 {804 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);805 }806 }807808 [StructLayout((LayoutKind)3)]809 [CompilerGenerated]810 private struct _003CAddAdditional_003Ed__54 : IAsyncStateMachine811 {812 public int _003C_003E1__state;813814 public AsyncTaskMethodBuilder<MP> _003C_003Et__builder;815816 public ISession session;817818 public IEntity entity;819820 public CancellationToken ct;821822 public string strUidPersonAdditional;823824 public string strUidPersonDecision;825826 public PersonWantsOrg _003C_003E4__this;827828 public string strReasonText;829830 public string uidJustification;831832 private LogicParameter _003Clp_003E5__2;833834 private ISqlFormatter _003CfSql_003E5__3;835836 private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;837838 private ConfiguredTaskAwaiter<bool> _003C_003Eu__2;839840 private void MoveNext()841 {842 //IL_00a1: Unknown result type (might be due to invalid IL or missing references)843 //IL_00a6: Unknown result type (might be due to invalid IL or missing references)844 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)845 //IL_0132: Unknown result type (might be due to invalid IL or missing references)846 //IL_0137: Unknown result type (might be due to invalid IL or missing references)847 //IL_013e: Unknown result type (might be due to invalid IL or missing references)848 //IL_01e3: Unknown result type (might be due to invalid IL or missing references)849 //IL_01e8: Unknown result type (might be due to invalid IL or missing references)850 //IL_01f0: Unknown result type (might be due to invalid IL or missing references)851 //IL_0031: Unknown result type (might be due to invalid IL or missing references)852 //IL_0065: Unknown result type (might be due to invalid IL or missing references)853 //IL_006a: Unknown result type (might be due to invalid IL or missing references)854 //IL_006e: Unknown result type (might be due to invalid IL or missing references)855 //IL_0073: Unknown result type (might be due to invalid IL or missing references)856 //IL_0087: Unknown result type (might be due to invalid IL or missing references)857 //IL_0088: Unknown result type (might be due to invalid IL or missing references)858 //IL_00f6: Unknown result type (might be due to invalid IL or missing references)859 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)860 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)861 //IL_0104: Unknown result type (might be due to invalid IL or missing references)862 //IL_0118: Unknown result type (might be due to invalid IL or missing references)863 //IL_0119: Unknown result type (might be due to invalid IL or missing references)864 //IL_01a5: Unknown result type (might be due to invalid IL or missing references)865 //IL_01aa: Unknown result type (might be due to invalid IL or missing references)866 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)867 //IL_01b3: Unknown result type (might be due to invalid IL or missing references)868 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)869 //IL_01ca: Unknown result type (might be due to invalid IL or missing references)870 int num = _003C_003E1__state;871 PersonWantsOrg personWantsOrg = _003C_003E4__this;872 MP result;873 try874 {875 ConfiguredTaskAwaiter<IEntity> val2;876 ConfiguredTaskAwaiter<bool> val;877 switch (num)878 {879 default:880 _003Clp_003E5__2 = new LogicParameter(session, null, entity, null, null, ct);881 _003CfSql_003E5__3 = _003Clp_003E5__2.SqlFormatter;882 val2 = GetPwoHelperPwO(_003Clp_003E5__2, strUidPersonAdditional, bDecision: true).ConfigureAwait(false).GetAwaiter();883 if (!val2.IsCompleted)884 {885 num = (_003C_003E1__state = 0);886 _003C_003Eu__1 = val2;887 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddAdditional_003Ed__54>(ref val2, ref this);888 return;889 }890 goto IL_00bc;891 case 0:892 val2 = _003C_003Eu__1;893 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);894 num = (_003C_003E1__state = -1);895 goto IL_00bc;896 case 1:897 val2 = _003C_003Eu__1;898 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);899 num = (_003C_003E1__state = -1);900 goto IL_014d;901 case 2:902 {903 val = _003C_003Eu__2;904 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<bool>);905 num = (_003C_003E1__state = -1);906 break;907 }908 IL_014d:909 if (!(val2.GetResult() ?? throw new ViException(2133172, ExceptionRelevance.EndUser)).CreateWalker(_003Clp_003E5__2.Session).GetValue("FK(UID_QERWorkingStep).IsAdditionalAllowed").Bool)910 {911 throw new ViException(2133367, ExceptionRelevance.EndUser);912 }913 val = personWantsOrg.IsValidDecisionMaker(_003Clp_003E5__2, strUidPersonAdditional, bAutoDecision: false).ConfigureAwait(false).GetAwaiter();914 if (!val.IsCompleted)915 {916 num = (_003C_003E1__state = 2);917 _003C_003Eu__2 = val;918 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003CAddAdditional_003Ed__54>(ref val, ref this);919 return;920 }921 break;922 IL_00bc:923 if (val2.GetResult() != null)924 {925 throw new ViException(2133380, ExceptionRelevance.EndUser);926 }927 val2 = GetPwoHelperPwO(_003Clp_003E5__2, strUidPersonDecision, bDecision: true, _003CfSql_003E5__3.EmptyClause("UID_PersonAdditional", ValType.String, FormatterOptions.NonUnicodeLiterals)).ConfigureAwait(false).GetAwaiter();928 if (!val2.IsCompleted)929 {930 num = (_003C_003E1__state = 1);931 _003C_003Eu__1 = val2;932 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddAdditional_003Ed__54>(ref val2, ref this);933 return;934 }935 goto IL_014d;936 }937 if (val.GetResult())938 {939 throw new ViException(2133369, ExceptionRelevance.EndUser);940 }941 result = new MP942 {943 Person = strUidPersonDecision,944 PersonSub = strUidPersonAdditional,945 Message = strReasonText,946 Justification = uidJustification947 };948 }949 catch (System.Exception exception)950 {951 _003C_003E1__state = -2;952 _003Clp_003E5__2 = null;953 _003CfSql_003E5__3 = null;954 _003C_003Et__builder.SetException(exception);955 return;956 }957 _003C_003E1__state = -2;958 _003Clp_003E5__2 = null;959 _003CfSql_003E5__3 = null;960 _003C_003Et__builder.SetResult(result);961 }962963 [DebuggerHidden]964 private void SetStateMachine(IAsyncStateMachine stateMachine)965 {966 _003C_003Et__builder.SetStateMachine(stateMachine);967 }968 }969970 [StructLayout((LayoutKind)3)]971 [CompilerGenerated]972 private struct _003CAddAdditional_OnSaving_003Ed__55 : IAsyncStateMachine973 {974 public int _003C_003E1__state;975976 public AsyncTaskMethodBuilder _003C_003Et__builder;977978 public IEntity entity;979980 public LogicReadWriteParameters parameter;981982 public CancellationToken ct;983984 public MP mp;985986 public PersonWantsOrg _003C_003E4__this;987988 private LogicParameter _003Clp_003E5__2;989990 private string _003CuidPersonDecision_003E5__3;991992 private string _003CuidPersonAdditional_003E5__4;993994 private string _003CstrReasonText_003E5__5;995996 private IEntity _003CdbPwoHelperPwO_003E5__6;997998 private IEntityWalker _003CeWalker_003E5__7;9991000 private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;10011002 private ConfiguredTaskAwaiter<bool> _003C_003Eu__2;10031004 private ConfiguredTaskAwaiter _003C_003Eu__3;10051006 private void MoveNext()1007 {1008 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)1009 //IL_00ed: Unknown result type (might be due to invalid IL or missing references)1010 //IL_00f5: Unknown result type (might be due to invalid IL or missing references)1011 //IL_01bb: Unknown result type (might be due to invalid IL or missing references)1012 //IL_01c0: Unknown result type (might be due to invalid IL or missing references)1013 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)1014 //IL_0273: Unknown result type (might be due to invalid IL or missing references)1015 //IL_0278: Unknown result type (might be due to invalid IL or missing references)1016 //IL_0280: Unknown result type (might be due to invalid IL or missing references)1017 //IL_03b2: Unknown result type (might be due to invalid IL or missing references)1018 //IL_03b7: Unknown result type (might be due to invalid IL or missing references)1019 //IL_03bf: Unknown result type (might be due to invalid IL or missing references)1020 //IL_0481: Unknown result type (might be due to invalid IL or missing references)1021 //IL_0486: Unknown result type (might be due to invalid IL or missing references)1022 //IL_048e: Unknown result type (might be due to invalid IL or missing references)1023 //IL_0036: Unknown result type (might be due to invalid IL or missing references)1024 //IL_0374: Unknown result type (might be due to invalid IL or missing references)1025 //IL_0379: Unknown result type (might be due to invalid IL or missing references)1026 //IL_037d: Unknown result type (might be due to invalid IL or missing references)1027 //IL_0382: Unknown result type (might be due to invalid IL or missing references)1028 //IL_0443: Unknown result type (might be due to invalid IL or missing references)1029 //IL_0448: Unknown result type (might be due to invalid IL or missing references)1030 //IL_044c: Unknown result type (might be due to invalid IL or missing references)1031 //IL_0451: Unknown result type (might be due to invalid IL or missing references)1032 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)1033 //IL_00af: Unknown result type (might be due to invalid IL or missing references)1034 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)1035 //IL_00b8: Unknown result type (might be due to invalid IL or missing references)1036 //IL_022a: Unknown result type (might be due to invalid IL or missing references)1037 //IL_0235: Unknown result type (might be due to invalid IL or missing references)1038 //IL_023a: Unknown result type (might be due to invalid IL or missing references)1039 //IL_023e: Unknown result type (might be due to invalid IL or missing references)1040 //IL_0243: Unknown result type (might be due to invalid IL or missing references)1041 //IL_0397: Unknown result type (might be due to invalid IL or missing references)1042 //IL_0399: Unknown result type (might be due to invalid IL or missing references)1043 //IL_0466: Unknown result type (might be due to invalid IL or missing references)1044 //IL_0468: Unknown result type (might be due to invalid IL or missing references)1045 //IL_00cd: Unknown result type (might be due to invalid IL or missing references)1046 //IL_00cf: Unknown result type (might be due to invalid IL or missing references)1047 //IL_017d: Unknown result type (might be due to invalid IL or missing references)1048 //IL_0182: Unknown result type (might be due to invalid IL or missing references)1049 //IL_0186: Unknown result type (might be due to invalid IL or missing references)1050 //IL_018b: Unknown result type (might be due to invalid IL or missing references)1051 //IL_0258: Unknown result type (might be due to invalid IL or missing references)1052 //IL_025a: Unknown result type (might be due to invalid IL or missing references)1053 //IL_01a0: Unknown result type (might be due to invalid IL or missing references)1054 //IL_01a2: Unknown result type (might be due to invalid IL or missing references)1055 int num = _003C_003E1__state;1056 PersonWantsOrg personWantsOrg = _003C_003E4__this;1057 try1058 {1059 ConfiguredTaskAwaiter<IEntity> val3;1060 ConfiguredTaskAwaiter<bool> val2;1061 ConfiguredTaskAwaiter val;1062 Dictionary<string, object> obj;1063 Dictionary<string, object> dicParameter;1064 ConfiguredTaskAwaitable val4;1065 IEntity result;1066 switch (num)1067 {1068 default:1069 {1070 _003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);1071 _003CuidPersonDecision_003E5__3 = mp.Person;1072 _003CuidPersonAdditional_003E5__4 = mp.PersonSub;1073 _003CstrReasonText_003E5__5 = mp.Message;1074 ISqlFormatter sqlFormatter = _003Clp_003E5__2.SqlFormatter;1075 if (sqlFormatter != null)1076 {1077 val3 = GetPwoHelperPwO(_003Clp_003E5__2, _003CuidPersonDecision_003E5__3, bDecision: true, sqlFormatter.EmptyClause("UID_PersonAdditional", ValType.String, FormatterOptions.NonUnicodeLiterals)).ConfigureAwait(false).GetAwaiter();1078 if (!val3.IsCompleted)1079 {1080 num = (_003C_003E1__state = 0);1081 _003C_003Eu__1 = val3;1082 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddAdditional_OnSaving_003Ed__55>(ref val3, ref this);1083 return;1084 }1085 goto IL_0104;1086 }1087 goto end_IL_000e;1088 }1089 case 0:1090 val3 = _003C_003Eu__1;1091 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1092 num = (_003C_003E1__state = -1);1093 goto IL_0104;1094 case 1:1095 val2 = _003C_003Eu__2;1096 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<bool>);1097 num = (_003C_003E1__state = -1);1098 goto IL_01d7;1099 case 2:1100 val = _003C_003Eu__3;1101 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);1102 num = (_003C_003E1__state = -1);1103 goto IL_028f;1104 case 3:1105 val = _003C_003Eu__3;1106 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);1107 num = (_003C_003E1__state = -1);1108 goto IL_03ce;1109 case 4:1110 {1111 val = _003C_003Eu__3;1112 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);1113 num = (_003C_003E1__state = -1);1114 break;1115 }1116 IL_028f:1117 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1118 _003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPersonDecision_003E5__3);1119 _003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReasonText_003E5__5);1120 _003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);1121 _003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);1122 _003Clp_003E5__2.Entity.SetValue("IsReserved", false);1123 obj = new Dictionary<string, object>((IEqualityComparer<string>)(object)StringComparer.OrdinalIgnoreCase);1124 obj.Add("UID_PersonAdditional", (object)_003CuidPersonAdditional_003E5__4);1125 obj.Add("UID_PwOHelperPwO", (object)_003CdbPwoHelperPwO_003E5__6.GetValue<string>("UID_PwOHelperPwO"));1126 dicParameter = obj;1127 val4 = personWantsOrg.ChangeState(_003Clp_003E5__2, PwOFunction.AddAdditional, PwOCondition.None, (IDictionary<string, object>?)(object)dicParameter).ConfigureAwait(false);1128 val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1129 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1130 {1131 num = (_003C_003E1__state = 3);1132 _003C_003Eu__3 = val;1133 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddAdditional_OnSaving_003Ed__55>(ref val, ref this);1134 return;1135 }1136 goto IL_03ce;1137 IL_01d7:1138 if (val2.GetResult())1139 {1140 throw new ViException(2133369, ExceptionRelevance.EndUser);1141 }1142 _003CdbPwoHelperPwO_003E5__6.SetValue("UID_PersonAdditional", _003CuidPersonAdditional_003E5__4);1143 _003CdbPwoHelperPwO_003E5__6.SetValue("ReasonHead", _003CstrReasonText_003E5__5);1144 val4 = _003Clp_003E5__2.UnitOfWork.PutAsync(_003CdbPwoHelperPwO_003E5__6, ct).ConfigureAwait(false);1145 val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1146 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1147 {1148 num = (_003C_003E1__state = 2);1149 _003C_003Eu__3 = val;1150 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddAdditional_OnSaving_003Ed__55>(ref val, ref this);1151 return;1152 }1153 goto IL_028f;1154 IL_0104:1155 result = val3.GetResult();1156 _003CdbPwoHelperPwO_003E5__6 = result;1157 if (_003CdbPwoHelperPwO_003E5__6 == null)1158 {1159 throw new ViException(2133172, ExceptionRelevance.EndUser);1160 }1161 _003CeWalker_003E5__7 = _003CdbPwoHelperPwO_003E5__6.CreateWalker(_003Clp_003E5__2.Session);1162 if (!_003CeWalker_003E5__7.GetValue("FK(UID_QERWorkingStep).IsAdditionalAllowed").Bool)1163 {1164 throw new ViException(2133367, ExceptionRelevance.EndUser);1165 }1166 val2 = personWantsOrg.IsValidDecisionMaker(_003Clp_003E5__2, _003CuidPersonAdditional_003E5__4, bAutoDecision: false).ConfigureAwait(false).GetAwaiter();1167 if (!val2.IsCompleted)1168 {1169 num = (_003C_003E1__state = 1);1170 _003C_003Eu__2 = val2;1171 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003CAddAdditional_OnSaving_003Ed__55>(ref val2, ref this);1172 return;1173 }1174 goto IL_01d7;1175 IL_03ce:1176 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1177 val4 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.AddAdditional, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)1178 {1179 DecisionStep = _003CeWalker_003E5__7.GetValue<string>("FK(UID_QERWorkingStep).Ident_PwODecisionStep"),1180 Person = _003CuidPersonDecision_003E5__3,1181 Text = _003CstrReasonText_003E5__5,1182 UIDPersonRelated = _003CuidPersonAdditional_003E5__4,1183 RulerLevel = _003CdbPwoHelperPwO_003E5__6.GetValue<int>("RulerLevel")1184 }).ConfigureAwait(false);1185 val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1186 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1187 {1188 num = (_003C_003E1__state = 4);1189 _003C_003Eu__3 = val;1190 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddAdditional_OnSaving_003Ed__55>(ref val, ref this);1191 return;1192 }1193 break;1194 }1195 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1196 _003CdbPwoHelperPwO_003E5__6 = null;1197 _003CeWalker_003E5__7 = null;1198 end_IL_000e:;1199 }1200 catch (System.Exception exception)1201 {1202 _003C_003E1__state = -2;1203 _003Clp_003E5__2 = null;1204 _003CuidPersonDecision_003E5__3 = null;1205 _003CuidPersonAdditional_003E5__4 = null;1206 _003CstrReasonText_003E5__5 = null;1207 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1208 return;1209 }1210 _003C_003E1__state = -2;1211 _003Clp_003E5__2 = null;1212 _003CuidPersonDecision_003E5__3 = null;1213 _003CuidPersonAdditional_003E5__4 = null;1214 _003CstrReasonText_003E5__5 = null;1215 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1216 }12171218 [DebuggerHidden]1219 private void SetStateMachine(IAsyncStateMachine stateMachine)1220 {1221 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1222 }1223 }12241225 [StructLayout((LayoutKind)3)]1226 [CompilerGenerated]1227 private struct _003CAddHistoryEntry_OnSaving_003Ed__71 : IAsyncStateMachine1228 {1229 public int _003C_003E1__state;12301231 public AsyncTaskMethodBuilder _003C_003Et__builder;12321233 public string xmlObjectData;12341235 public PersonWantsOrg _003C_003E4__this;12361237 public IEntity entity;12381239 public LogicReadWriteParameters parameter;12401241 public CancellationToken ct;12421243 private ConfiguredTaskAwaiter _003C_003Eu__1;12441245 private void MoveNext()1246 {1247 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)1248 //IL_00b1: Unknown result type (might be due to invalid IL or missing references)1249 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)1250 //IL_0066: Unknown result type (might be due to invalid IL or missing references)1251 //IL_0071: Unknown result type (might be due to invalid IL or missing references)1252 //IL_0076: Unknown result type (might be due to invalid IL or missing references)1253 //IL_007a: Unknown result type (might be due to invalid IL or missing references)1254 //IL_007f: Unknown result type (might be due to invalid IL or missing references)1255 //IL_0094: Unknown result type (might be due to invalid IL or missing references)1256 //IL_0096: Unknown result type (might be due to invalid IL or missing references)1257 int num = _003C_003E1__state;1258 PersonWantsOrg personWantsOrg = _003C_003E4__this;1259 try1260 {1261 ConfiguredTaskAwaiter val3;1262 if (num != 0)1263 {1264 EntityData entityData = XmlTransportSerialization.EntityDataFromXml(xmlObjectData);1265 Dictionary<string, object> val = new Dictionary<string, object>();1266 ColumnData[] columns = entityData.Columns;1267 foreach (ColumnData columnData in columns)1268 {1269 val.Add(columnData.Name, (object)columnData.Value);1270 }1271 ConfiguredTaskAwaitable val2 = personWantsOrg.AddHistoryEntry_OnSaving(entity, parameter, (IDictionary<string, object>)(object)val, ct).ConfigureAwait(false);1272 val3 = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();1273 if (!((ConfiguredTaskAwaiter)(ref val3)).IsCompleted)1274 {1275 num = (_003C_003E1__state = 0);1276 _003C_003Eu__1 = val3;1277 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddHistoryEntry_OnSaving_003Ed__71>(ref val3, ref this);1278 return;1279 }1280 }1281 else1282 {1283 val3 = _003C_003Eu__1;1284 _003C_003Eu__1 = default(ConfiguredTaskAwaiter);1285 num = (_003C_003E1__state = -1);1286 }1287 ((ConfiguredTaskAwaiter)(ref val3)).GetResult();1288 }1289 catch (System.Exception exception)1290 {1291 _003C_003E1__state = -2;1292 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1293 return;1294 }1295 _003C_003E1__state = -2;1296 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1297 }12981299 [DebuggerHidden]1300 private void SetStateMachine(IAsyncStateMachine stateMachine)1301 {1302 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1303 }1304 }13051306 [StructLayout((LayoutKind)3)]1307 [CompilerGenerated]1308 private struct _003CAddHistoryEntry_OnSaving_003Ed__72 : IAsyncStateMachine1309 {1310 public int _003C_003E1__state;13111312 public AsyncTaskMethodBuilder _003C_003Et__builder;13131314 public LogicReadWriteParameters parameter;13151316 public CancellationToken ct;13171318 public IDictionary<string, object> dicData;13191320 private IEntity _003CdbHistory_003E5__2;13211322 private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__1;13231324 private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__2;13251326 private ConfiguredTaskAwaiter _003C_003Eu__3;13271328 private void MoveNext()1329 {1330 //IL_0077: Unknown result type (might be due to invalid IL or missing references)1331 //IL_007c: Unknown result type (might be due to invalid IL or missing references)1332 //IL_0083: Unknown result type (might be due to invalid IL or missing references)1333 //IL_0100: Unknown result type (might be due to invalid IL or missing references)1334 //IL_0105: Unknown result type (might be due to invalid IL or missing references)1335 //IL_010d: Unknown result type (might be due to invalid IL or missing references)1336 //IL_020e: Unknown result type (might be due to invalid IL or missing references)1337 //IL_0213: Unknown result type (might be due to invalid IL or missing references)1338 //IL_021b: Unknown result type (might be due to invalid IL or missing references)1339 //IL_0030: Unknown result type (might be due to invalid IL or missing references)1340 //IL_003b: Unknown result type (might be due to invalid IL or missing references)1341 //IL_0040: Unknown result type (might be due to invalid IL or missing references)1342 //IL_0044: Unknown result type (might be due to invalid IL or missing references)1343 //IL_0049: Unknown result type (might be due to invalid IL or missing references)1344 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)1345 //IL_00c2: Unknown result type (might be due to invalid IL or missing references)1346 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)1347 //IL_00cb: Unknown result type (might be due to invalid IL or missing references)1348 //IL_00d0: Unknown result type (might be due to invalid IL or missing references)1349 //IL_005d: Unknown result type (might be due to invalid IL or missing references)1350 //IL_005e: Unknown result type (might be due to invalid IL or missing references)1351 //IL_00e5: Unknown result type (might be due to invalid IL or missing references)1352 //IL_00e7: Unknown result type (might be due to invalid IL or missing references)1353 //IL_0135: Unknown result type (might be due to invalid IL or missing references)1354 //IL_013a: Unknown result type (might be due to invalid IL or missing references)1355 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)1356 //IL_01d3: Unknown result type (might be due to invalid IL or missing references)1357 //IL_01d8: Unknown result type (might be due to invalid IL or missing references)1358 //IL_01dc: Unknown result type (might be due to invalid IL or missing references)1359 //IL_01e1: Unknown result type (might be due to invalid IL or missing references)1360 //IL_01f6: Unknown result type (might be due to invalid IL or missing references)1361 //IL_01f8: Unknown result type (might be due to invalid IL or missing references)1362 int num = _003C_003E1__state;1363 try1364 {1365 ConfiguredTaskAwaiter<IEntity> val3;1366 ConfiguredTaskAwaiter<IMetaTable> val2;1367 ConfiguredTaskAwaiter val;1368 IMetaTable result;1369 System.Collections.Generic.IEnumerator<KeyValuePair<string, object>> enumerator;1370 ConfiguredTaskAwaitable val4;1371 IEntity result2;1372 switch (num)1373 {1374 default:1375 val3 = parameter.Session.Source().CreateNewAsync("PwODecisionHistory", EntityCreationType.DelayedLogic, ct).ConfigureAwait(false)1376 .GetAwaiter();1377 if (!val3.IsCompleted)1378 {1379 num = (_003C_003E1__state = 0);1380 _003C_003Eu__1 = val3;1381 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddHistoryEntry_OnSaving_003Ed__72>(ref val3, ref this);1382 return;1383 }1384 goto IL_0092;1385 case 0:1386 val3 = _003C_003Eu__1;1387 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1388 num = (_003C_003E1__state = -1);1389 goto IL_0092;1390 case 1:1391 val2 = _003C_003Eu__2;1392 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<IMetaTable>);1393 num = (_003C_003E1__state = -1);1394 goto IL_011c;1395 case 2:1396 {1397 val = _003C_003Eu__3;1398 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);1399 num = (_003C_003E1__state = -1);1400 break;1401 }1402 IL_011c:1403 result = val2.GetResult();1404 enumerator = ((System.Collections.Generic.IEnumerable<KeyValuePair<string, object>>)dicData).GetEnumerator();1405 try1406 {1407 while (((System.Collections.IEnumerator)enumerator).MoveNext())1408 {1409 KeyValuePair<string, object> current = enumerator.Current;1410 IMetaColumn metaColumn = result.Columns[current.Key];1411 if (!metaColumn.IsSpecial && result.Columns.Contains(metaColumn.Columnname))1412 {1413 _003CdbHistory_003E5__2.SetValue(metaColumn.Columnname, current.Value);1414 }1415 }1416 }1417 finally1418 {1419 if (num < 0)1420 {1421 ((System.IDisposable)enumerator)?.Dispose();1422 }1423 }1424 _003CdbHistory_003E5__2.SetValue("DecisionType", "AddHistoryEntry");1425 val4 = parameter.UnitOfWork.PutAsync(_003CdbHistory_003E5__2, ct).ConfigureAwait(false);1426 val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1427 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1428 {1429 num = (_003C_003E1__state = 2);1430 _003C_003Eu__3 = val;1431 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddHistoryEntry_OnSaving_003Ed__72>(ref val, ref this);1432 return;1433 }1434 break;1435 IL_0092:1436 result2 = val3.GetResult();1437 _003CdbHistory_003E5__2 = result2;1438 val2 = parameter.Session.MetaData().GetTableAsync("PwODecisionHistory", ct).ConfigureAwait(false)1439 .GetAwaiter();1440 if (!val2.IsCompleted)1441 {1442 num = (_003C_003E1__state = 1);1443 _003C_003Eu__2 = val2;1444 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003CAddHistoryEntry_OnSaving_003Ed__72>(ref val2, ref this);1445 return;1446 }1447 goto IL_011c;1448 }1449 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1450 }1451 catch (System.Exception exception)1452 {1453 _003C_003E1__state = -2;1454 _003CdbHistory_003E5__2 = null;1455 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1456 return;1457 }1458 _003C_003E1__state = -2;1459 _003CdbHistory_003E5__2 = null;1460 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1461 }14621463 [DebuggerHidden]1464 private void SetStateMachine(IAsyncStateMachine stateMachine)1465 {1466 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1467 }1468 }14691470 [StructLayout((LayoutKind)3)]1471 [CompilerGenerated]1472 private struct _003CAddInsteadOf_003Ed__58 : IAsyncStateMachine1473 {1474 public int _003C_003E1__state;14751476 public AsyncTaskMethodBuilder<MP> _003C_003Et__builder;14771478 public ISession session;14791480 public IEntity entity;14811482 public CancellationToken ct;14831484 public string uidPersonDecision;14851486 public string uidPersonInsteadOf;14871488 public string strReasonText;14891490 public string uidJustification;14911492 private LogicParameter _003Clp_003E5__2;14931494 private ISqlFormatter _003CfSql_003E5__3;14951496 private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;14971498 private void MoveNext()1499 {1500 //IL_00af: Unknown result type (might be due to invalid IL or missing references)1501 //IL_00b4: Unknown result type (might be due to invalid IL or missing references)1502 //IL_00bb: Unknown result type (might be due to invalid IL or missing references)1503 //IL_012e: Unknown result type (might be due to invalid IL or missing references)1504 //IL_0133: Unknown result type (might be due to invalid IL or missing references)1505 //IL_013a: Unknown result type (might be due to invalid IL or missing references)1506 //IL_01be: Unknown result type (might be due to invalid IL or missing references)1507 //IL_01c3: Unknown result type (might be due to invalid IL or missing references)1508 //IL_01ca: Unknown result type (might be due to invalid IL or missing references)1509 //IL_002a: Unknown result type (might be due to invalid IL or missing references)1510 //IL_0074: Unknown result type (might be due to invalid IL or missing references)1511 //IL_0079: Unknown result type (might be due to invalid IL or missing references)1512 //IL_007c: Unknown result type (might be due to invalid IL or missing references)1513 //IL_0081: Unknown result type (might be due to invalid IL or missing references)1514 //IL_0095: Unknown result type (might be due to invalid IL or missing references)1515 //IL_0096: Unknown result type (might be due to invalid IL or missing references)1516 //IL_00f3: Unknown result type (might be due to invalid IL or missing references)1517 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)1518 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)1519 //IL_0100: Unknown result type (might be due to invalid IL or missing references)1520 //IL_0183: Unknown result type (might be due to invalid IL or missing references)1521 //IL_0188: Unknown result type (might be due to invalid IL or missing references)1522 //IL_018b: Unknown result type (might be due to invalid IL or missing references)1523 //IL_0190: Unknown result type (might be due to invalid IL or missing references)1524 //IL_0114: Unknown result type (might be due to invalid IL or missing references)1525 //IL_0115: Unknown result type (might be due to invalid IL or missing references)1526 //IL_01a4: Unknown result type (might be due to invalid IL or missing references)1527 //IL_01a5: Unknown result type (might be due to invalid IL or missing references)1528 int num = _003C_003E1__state;1529 MP result;1530 try1531 {1532 ConfiguredTaskAwaiter<IEntity> val;1533 switch (num)1534 {1535 default:1536 _003Clp_003E5__2 = new LogicParameter(session, null, entity, null, null, ct);1537 _003CfSql_003E5__3 = _003Clp_003E5__2.SqlFormatter;1538 val = GetPwoHelperPwO(_003Clp_003E5__2, uidPersonDecision, bDecision: false, _003CfSql_003E5__3.Comparison("IsFromDelegation", true, ValType.Bool)).ConfigureAwait(false).GetAwaiter();1539 if (!val.IsCompleted)1540 {1541 num = (_003C_003E1__state = 0);1542 _003C_003Eu__1 = val;1543 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_003Ed__58>(ref val, ref this);1544 return;1545 }1546 goto IL_00ca;1547 case 0:1548 val = _003C_003Eu__1;1549 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1550 num = (_003C_003E1__state = -1);1551 goto IL_00ca;1552 case 1:1553 val = _003C_003Eu__1;1554 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1555 num = (_003C_003E1__state = -1);1556 goto IL_0149;1557 case 2:1558 {1559 val = _003C_003Eu__1;1560 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1561 num = (_003C_003E1__state = -1);1562 break;1563 }1564 IL_0149:1565 if (val.GetResult() != null)1566 {1567 throw new ViException(2133380, ExceptionRelevance.EndUser);1568 }1569 val = GetPwoHelperPwO(_003Clp_003E5__2, uidPersonDecision, bDecision: true, _003CfSql_003E5__3.EmptyClause("UID_PersonInsteadOf", ValType.String, FormatterOptions.NonUnicodeLiterals)).ConfigureAwait(false).GetAwaiter();1570 if (!val.IsCompleted)1571 {1572 num = (_003C_003E1__state = 2);1573 _003C_003Eu__1 = val;1574 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_003Ed__58>(ref val, ref this);1575 return;1576 }1577 break;1578 IL_00ca:1579 if (val.GetResult() != null)1580 {1581 throw new ViException(2133391, ExceptionRelevance.EndUser);1582 }1583 val = GetPwoHelperPwO(_003Clp_003E5__2, uidPersonInsteadOf, bDecision: true).ConfigureAwait(false).GetAwaiter();1584 if (!val.IsCompleted)1585 {1586 num = (_003C_003E1__state = 1);1587 _003C_003Eu__1 = val;1588 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_003Ed__58>(ref val, ref this);1589 return;1590 }1591 goto IL_0149;1592 }1593 if (!(val.GetResult() ?? throw new ViException(2133172, ExceptionRelevance.EndUser)).CreateWalker(_003Clp_003E5__2.Session).GetValue("FK(UID_QERWorkingStep).IsInsteadOfAllowed").Bool)1594 {1595 throw new ViException(2133368, ExceptionRelevance.EndUser);1596 }1597 result = new MP1598 {1599 Person = uidPersonDecision,1600 PersonSub = uidPersonInsteadOf,1601 Message = strReasonText,1602 Justification = uidJustification1603 };1604 }1605 catch (System.Exception exception)1606 {1607 _003C_003E1__state = -2;1608 _003Clp_003E5__2 = null;1609 _003CfSql_003E5__3 = null;1610 _003C_003Et__builder.SetException(exception);1611 return;1612 }1613 _003C_003E1__state = -2;1614 _003Clp_003E5__2 = null;1615 _003CfSql_003E5__3 = null;1616 _003C_003Et__builder.SetResult(result);1617 }16181619 [DebuggerHidden]1620 private void SetStateMachine(IAsyncStateMachine stateMachine)1621 {1622 _003C_003Et__builder.SetStateMachine(stateMachine);1623 }1624 }16251626 [StructLayout((LayoutKind)3)]1627 [CompilerGenerated]1628 private struct _003CAddInsteadOf_OnSaving_003Ed__59 : IAsyncStateMachine1629 {1630 public int _003C_003E1__state;16311632 public AsyncTaskMethodBuilder _003C_003Et__builder;16331634 public IEntity entity;16351636 public LogicReadWriteParameters parameter;16371638 public CancellationToken ct;16391640 public MP mp;16411642 public PersonWantsOrg _003C_003E4__this;16431644 private LogicParameter _003Clp_003E5__2;16451646 private string _003CuidPersonDecision_003E5__3;16471648 private string _003CuidPersonInsteadOf_003E5__4;16491650 private string _003CstrReasonText_003E5__5;16511652 private IEntity _003CdbPwoHelperPwO_003E5__6;16531654 private IEntityWalker _003CeWalker_003E5__7;16551656 private ConfiguredTaskAwaiter<IEntity?> _003C_003Eu__1;16571658 private ConfiguredTaskAwaiter _003C_003Eu__2;16591660 private void MoveNext()1661 {1662 //IL_00de: Unknown result type (might be due to invalid IL or missing references)1663 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)1664 //IL_00eb: Unknown result type (might be due to invalid IL or missing references)1665 //IL_01dd: Unknown result type (might be due to invalid IL or missing references)1666 //IL_01e2: Unknown result type (might be due to invalid IL or missing references)1667 //IL_01ea: Unknown result type (might be due to invalid IL or missing references)1668 //IL_031c: Unknown result type (might be due to invalid IL or missing references)1669 //IL_0321: Unknown result type (might be due to invalid IL or missing references)1670 //IL_0329: Unknown result type (might be due to invalid IL or missing references)1671 //IL_03eb: Unknown result type (might be due to invalid IL or missing references)1672 //IL_03f0: Unknown result type (might be due to invalid IL or missing references)1673 //IL_03f8: Unknown result type (might be due to invalid IL or missing references)1674 //IL_0032: Unknown result type (might be due to invalid IL or missing references)1675 //IL_00a0: Unknown result type (might be due to invalid IL or missing references)1676 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)1677 //IL_00a9: Unknown result type (might be due to invalid IL or missing references)1678 //IL_00ae: Unknown result type (might be due to invalid IL or missing references)1679 //IL_02de: Unknown result type (might be due to invalid IL or missing references)1680 //IL_02e3: Unknown result type (might be due to invalid IL or missing references)1681 //IL_02e7: Unknown result type (might be due to invalid IL or missing references)1682 //IL_02ec: Unknown result type (might be due to invalid IL or missing references)1683 //IL_03ad: Unknown result type (might be due to invalid IL or missing references)1684 //IL_03b2: Unknown result type (might be due to invalid IL or missing references)1685 //IL_03b6: Unknown result type (might be due to invalid IL or missing references)1686 //IL_03bb: Unknown result type (might be due to invalid IL or missing references)1687 //IL_00c3: Unknown result type (might be due to invalid IL or missing references)1688 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)1689 //IL_0194: Unknown result type (might be due to invalid IL or missing references)1690 //IL_019f: Unknown result type (might be due to invalid IL or missing references)1691 //IL_01a4: Unknown result type (might be due to invalid IL or missing references)1692 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)1693 //IL_01ad: Unknown result type (might be due to invalid IL or missing references)1694 //IL_0301: Unknown result type (might be due to invalid IL or missing references)1695 //IL_0303: Unknown result type (might be due to invalid IL or missing references)1696 //IL_03d0: Unknown result type (might be due to invalid IL or missing references)1697 //IL_03d2: Unknown result type (might be due to invalid IL or missing references)1698 //IL_01c2: Unknown result type (might be due to invalid IL or missing references)1699 //IL_01c4: Unknown result type (might be due to invalid IL or missing references)1700 int num = _003C_003E1__state;1701 PersonWantsOrg personWantsOrg = _003C_003E4__this;1702 try1703 {1704 ConfiguredTaskAwaiter<IEntity> val2;1705 ConfiguredTaskAwaiter val;1706 Dictionary<string, object> obj;1707 Dictionary<string, object> dicParameter;1708 ConfiguredTaskAwaitable val3;1709 IEntity result;1710 switch (num)1711 {1712 default:1713 {1714 _003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);1715 _003CuidPersonDecision_003E5__3 = mp.Person;1716 _003CuidPersonInsteadOf_003E5__4 = mp.PersonSub;1717 _003CstrReasonText_003E5__5 = mp.Message;1718 ISqlFormatter sqlFormatter = _003Clp_003E5__2.SqlFormatter;1719 val2 = GetPwoHelperPwO(_003Clp_003E5__2, _003CuidPersonDecision_003E5__3, bDecision: true, sqlFormatter.EmptyClause("UID_PersonInsteadOf", ValType.String, FormatterOptions.NonUnicodeLiterals)).ConfigureAwait(false).GetAwaiter();1720 if (!val2.IsCompleted)1721 {1722 num = (_003C_003E1__state = 0);1723 _003C_003Eu__1 = val2;1724 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAddInsteadOf_OnSaving_003Ed__59>(ref val2, ref this);1725 return;1726 }1727 goto IL_00fa;1728 }1729 case 0:1730 val2 = _003C_003Eu__1;1731 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1732 num = (_003C_003E1__state = -1);1733 goto IL_00fa;1734 case 1:1735 val = _003C_003Eu__2;1736 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);1737 num = (_003C_003E1__state = -1);1738 goto IL_01f9;1739 case 2:1740 val = _003C_003Eu__2;1741 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);1742 num = (_003C_003E1__state = -1);1743 goto IL_0338;1744 case 3:1745 {1746 val = _003C_003Eu__2;1747 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);1748 num = (_003C_003E1__state = -1);1749 break;1750 }1751 IL_01f9:1752 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1753 _003Clp_003E5__2.Entity.SetValue("UID_PersonHead", _003CuidPersonDecision_003E5__3);1754 _003Clp_003E5__2.Entity.SetValue("ReasonHead", _003CstrReasonText_003E5__5);1755 _003Clp_003E5__2.Entity.SetValue("UID_QERJustification", mp.Justification);1756 _003Clp_003E5__2.Entity.SetValue("DateHead", _003Clp_003E5__2.ServerTime);1757 _003Clp_003E5__2.Entity.SetValue("IsReserved", false);1758 obj = new Dictionary<string, object>((IEqualityComparer<string>)(object)StringComparer.OrdinalIgnoreCase);1759 obj.Add("UID_PersonInsteadOf", (object)_003CuidPersonInsteadOf_003E5__4);1760 obj.Add("UID_PwOHelperPwO", (object)_003CdbPwoHelperPwO_003E5__6.GetValue<string>("UID_PwOHelperPwO"));1761 dicParameter = obj;1762 val3 = personWantsOrg.ChangeState(_003Clp_003E5__2, PwOFunction.AddInsteadOf, PwOCondition.None, (IDictionary<string, object>?)(object)dicParameter).ConfigureAwait(false);1763 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();1764 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1765 {1766 num = (_003C_003E1__state = 2);1767 _003C_003Eu__2 = val;1768 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddInsteadOf_OnSaving_003Ed__59>(ref val, ref this);1769 return;1770 }1771 goto IL_0338;1772 IL_00fa:1773 result = val2.GetResult();1774 _003CdbPwoHelperPwO_003E5__6 = result;1775 if (_003CdbPwoHelperPwO_003E5__6 == null)1776 {1777 throw new ViException(2133172, ExceptionRelevance.EndUser);1778 }1779 _003CeWalker_003E5__7 = _003CdbPwoHelperPwO_003E5__6.CreateWalker(_003Clp_003E5__2.Session);1780 _003CdbPwoHelperPwO_003E5__6.SetValue("UID_PersonInsteadOf", _003CuidPersonInsteadOf_003E5__4);1781 _003CdbPwoHelperPwO_003E5__6.SetValue("ReasonHead", _003CstrReasonText_003E5__5);1782 _003CdbPwoHelperPwO_003E5__6.SetValue("Decision", "D");1783 val3 = _003Clp_003E5__2.UnitOfWork.PutAsync(_003CdbPwoHelperPwO_003E5__6, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false);1784 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();1785 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1786 {1787 num = (_003C_003E1__state = 1);1788 _003C_003Eu__2 = val;1789 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddInsteadOf_OnSaving_003Ed__59>(ref val, ref this);1790 return;1791 }1792 goto IL_01f9;1793 IL_0338:1794 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1795 val3 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.AddInsteadOf, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)1796 {1797 DecisionStep = _003CeWalker_003E5__7.GetValue<string>("FK(UID_QERWorkingStep).Ident_PwODecisionStep"),1798 Person = _003CuidPersonDecision_003E5__3,1799 Text = _003CstrReasonText_003E5__5,1800 UIDPersonRelated = _003CuidPersonInsteadOf_003E5__4,1801 RulerLevel = _003CdbPwoHelperPwO_003E5__6.GetValue<int>("RulerLevel")1802 }).ConfigureAwait(false);1803 val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();1804 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1805 {1806 num = (_003C_003E1__state = 3);1807 _003C_003Eu__2 = val;1808 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAddInsteadOf_OnSaving_003Ed__59>(ref val, ref this);1809 return;1810 }1811 break;1812 }1813 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1814 }1815 catch (System.Exception exception)1816 {1817 _003C_003E1__state = -2;1818 _003Clp_003E5__2 = null;1819 _003CuidPersonDecision_003E5__3 = null;1820 _003CuidPersonInsteadOf_003E5__4 = null;1821 _003CstrReasonText_003E5__5 = null;1822 _003CdbPwoHelperPwO_003E5__6 = null;1823 _003CeWalker_003E5__7 = null;1824 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1825 return;1826 }1827 _003C_003E1__state = -2;1828 _003Clp_003E5__2 = null;1829 _003CuidPersonDecision_003E5__3 = null;1830 _003CuidPersonInsteadOf_003E5__4 = null;1831 _003CstrReasonText_003E5__5 = null;1832 _003CdbPwoHelperPwO_003E5__6 = null;1833 _003CeWalker_003E5__7 = null;1834 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1835 }18361837 [DebuggerHidden]1838 private void SetStateMachine(IAsyncStateMachine stateMachine)1839 {1840 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1841 }1842 }18431844 [StructLayout((LayoutKind)3)]1845 [CompilerGenerated]1846 private struct _003CAnswerFromPerson_OnSaving_003Ed__40 : IAsyncStateMachine1847 {1848 public int _003C_003E1__state;18491850 public AsyncTaskMethodBuilder _003C_003Et__builder;18511852 public IEntity entity;18531854 public LogicReadWriteParameters parameter;18551856 public CancellationToken ct;18571858 public MP mp;18591860 public PersonWantsOrg _003C_003E4__this;18611862 private LogicParameter _003Clp_003E5__2;18631864 private string _003CuidAnswerPerson_003E5__3;18651866 private string _003CstrAnswer_003E5__4;18671868 private ConfiguredTaskAwaiter<int> _003C_003Eu__1;18691870 private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__2;18711872 private ConfiguredTaskAwaiter _003C_003Eu__3;18731874 private void MoveNext()1875 {1876 //IL_0162: Unknown result type (might be due to invalid IL or missing references)1877 //IL_0167: Unknown result type (might be due to invalid IL or missing references)1878 //IL_016f: Unknown result type (might be due to invalid IL or missing references)1879 //IL_01f8: Unknown result type (might be due to invalid IL or missing references)1880 //IL_01fd: Unknown result type (might be due to invalid IL or missing references)1881 //IL_0205: Unknown result type (might be due to invalid IL or missing references)1882 //IL_02ac: Unknown result type (might be due to invalid IL or missing references)1883 //IL_02b1: Unknown result type (might be due to invalid IL or missing references)1884 //IL_02b9: Unknown result type (might be due to invalid IL or missing references)1885 //IL_002e: Unknown result type (might be due to invalid IL or missing references)1886 //IL_0119: Unknown result type (might be due to invalid IL or missing references)1887 //IL_0124: Unknown result type (might be due to invalid IL or missing references)1888 //IL_0129: Unknown result type (might be due to invalid IL or missing references)1889 //IL_012d: Unknown result type (might be due to invalid IL or missing references)1890 //IL_0132: Unknown result type (might be due to invalid IL or missing references)1891 //IL_0147: Unknown result type (might be due to invalid IL or missing references)1892 //IL_0149: Unknown result type (might be due to invalid IL or missing references)1893 //IL_026e: Unknown result type (might be due to invalid IL or missing references)1894 //IL_0273: Unknown result type (might be due to invalid IL or missing references)1895 //IL_0277: Unknown result type (might be due to invalid IL or missing references)1896 //IL_027c: Unknown result type (might be due to invalid IL or missing references)1897 //IL_01af: Unknown result type (might be due to invalid IL or missing references)1898 //IL_01ba: Unknown result type (might be due to invalid IL or missing references)1899 //IL_01bf: Unknown result type (might be due to invalid IL or missing references)1900 //IL_01c3: Unknown result type (might be due to invalid IL or missing references)1901 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)1902 //IL_0291: Unknown result type (might be due to invalid IL or missing references)1903 //IL_0293: Unknown result type (might be due to invalid IL or missing references)1904 //IL_01dd: Unknown result type (might be due to invalid IL or missing references)1905 //IL_01df: Unknown result type (might be due to invalid IL or missing references)1906 int num = _003C_003E1__state;1907 PersonWantsOrg personWantsOrg = _003C_003E4__this;1908 try1909 {1910 ConfiguredTaskAwaiter<int> val3;1911 ConfiguredTaskAwaiter<IEntity> val2;1912 ConfiguredTaskAwaiter val;1913 IEntity result;1914 ConfiguredTaskAwaitable val4;1915 switch (num)1916 {1917 default:1918 {1919 _003Clp_003E5__2 = new LogicParameter(entity, parameter, ct);1920 _003CuidAnswerPerson_003E5__3 = mp.Person;1921 _003CstrAnswer_003E5__4 = mp.Message;1922 ISqlFormatter sqlFormatter = _003Clp_003E5__2.SqlFormatter;1923 string text = sqlFormatter.AndRelation(sqlFormatter.UidComparison("UID_PersonWantsOrg", _003Clp_003E5__2.Entity.GetValue<string>("UID_PersonWantsOrg")), sqlFormatter.UidComparison("UID_PersonHead", _003CuidAnswerPerson_003E5__3), sqlFormatter.Comparison("LevelNumber", _003Clp_003E5__2.Entity.GetValue<int>("DecisionLevel"), ValType.Int), sqlFormatter.UidComparison("UID_PWODecisionRule", WellKnownDecisionRules.QP));1924 string statement = $"delete from PWOHelperPWO where {text}";1925 val3 = _003Clp_003E5__2.DbSession.SqlExecuteNonQueryInContextAsync(parameter.Session, statement, _003Clp_003E5__2.CancellationToken).ConfigureAwait(false).GetAwaiter();1926 if (!val3.IsCompleted)1927 {1928 num = (_003C_003E1__state = 0);1929 _003C_003Eu__1 = val3;1930 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<int>, _003CAnswerFromPerson_OnSaving_003Ed__40>(ref val3, ref this);1931 return;1932 }1933 goto IL_017e;1934 }1935 case 0:1936 val3 = _003C_003Eu__1;1937 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<int>);1938 num = (_003C_003E1__state = -1);1939 goto IL_017e;1940 case 1:1941 val2 = _003C_003Eu__2;1942 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<IEntity>);1943 num = (_003C_003E1__state = -1);1944 goto IL_0214;1945 case 2:1946 {1947 val = _003C_003Eu__3;1948 _003C_003Eu__3 = default(ConfiguredTaskAwaiter);1949 num = (_003C_003E1__state = -1);1950 break;1951 }1952 IL_0214:1953 result = val2.GetResult();1954 throw new ViException(2133233, ExceptionRelevance.EndUser, result.Display);1955 IL_017e:1956 if (val3.GetResult() == 0)1957 {1958 DbObjectKey objectKey = DbObjectKey.GetObjectKey("Person", _003CuidAnswerPerson_003E5__3);1959 val2 = _003Clp_003E5__2.Session.Source().GetAsync(objectKey, ct).ConfigureAwait(false)1960 .GetAwaiter();1961 if (!val2.IsCompleted)1962 {1963 num = (_003C_003E1__state = 1);1964 _003C_003Eu__2 = val2;1965 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CAnswerFromPerson_OnSaving_003Ed__40>(ref val2, ref this);1966 return;1967 }1968 goto IL_0214;1969 }1970 val4 = Handle_DecisionHistory(_003Clp_003E5__2, DecisionType.Answer, new DecisionHistoryArgs(_003Clp_003E5__2.Entity)1971 {1972 Person = _003CuidAnswerPerson_003E5__3,1973 Text = _003CstrAnswer_003E5__41974 }).ConfigureAwait(false);1975 val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1976 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1977 {1978 num = (_003C_003E1__state = 2);1979 _003C_003Eu__3 = val;1980 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CAnswerFromPerson_OnSaving_003Ed__40>(ref val, ref this);1981 return;1982 }1983 break;1984 }1985 ((ConfiguredTaskAwaiter)(ref val)).GetResult();1986 personWantsOrg.Handle_Events(_003Clp_003E5__2, DecisionType.Answer, _003CuidAnswerPerson_003E5__3, _003CstrAnswer_003E5__4, null);1987 }1988 catch (System.Exception exception)1989 {1990 _003C_003E1__state = -2;1991 _003Clp_003E5__2 = null;1992 _003CuidAnswerPerson_003E5__3 = null;1993 _003CstrAnswer_003E5__4 = null;1994 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1995 return;1996 }1997 _003C_003E1__state = -2;1998 _003Clp_003E5__2 = null;1999 _003CuidAnswerPerson_003E5__3 = null;2000 _003CstrAnswer_003E5__4 = null;2001 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();2002 }20032004 [DebuggerHidden]2005 private void SetStateMachine(IAsyncStateMachine stateMachine)2006 {2007 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);2008 }2009 }20102011 [StructLayout((LayoutKind)3)]2012 [CompilerGenerated]2013 private struct _003CAssign_OnSaving_003Ed__50 : IAsyncStateMachine2014 {2015 public int _003C_003E1__state;20162017 public AsyncTaskMethodBuilder _003C_003Et__builder;20182019 public PersonWantsOrg _003C_003E4__this;20202021 public IEntity entity;20222023 public LogicReadWriteParameters parameter;20242025 public CancellationToken ct;20262027 public MP mp;20282029 private LogicParameter _003Clp_003E5__2;20302031 private string _003CstrReasonText_003E5__3;20322033 private PwOCondition _003Ccondition_003E5__4;20342035 private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;20362037 private ConfiguredTaskAwaiter _003C_003Eu__2;20382039 private IEntity _003C_003E7__wrap4;20402041 private ConfiguredTaskAwaiter<System.DateTime> _003C_003Eu__3;20422043 private void MoveNext()2044 {2045 //IL_012a: Unknown result type (might be due to invalid IL or missing references)2046 //IL_012f: Unknown result type (might be due to invalid IL or missing references)2047 //IL_0136: Unknown result type (might be due to invalid IL or missing references)2048 //IL_0198: Unknown result type (might be due to invalid IL or missing references)2049 //IL_019d: Unknown result type (might be due to invalid IL or missing references)2050 //IL_01a5: Unknown result type (might be due to invalid IL or missing references)2051 //IL_0208: Unknown result type (might be due to invalid IL or missing references)2052 //IL_020d: Unknown result type (might be due to invalid IL or missing references)2053 //IL_0214: Unknown result type (might be due to invalid IL or missing references)2054 //IL_0276: Unknown result type (might be due to invalid IL or missing references)2055 //IL_027b: Unknown result type (might be due to invalid IL or missing references)2056 //IL_0283: Unknown result type (might be due to invalid IL or missing references)2057 //IL_032c: Unknown result type (might be due to invalid IL or missing references)2058 //IL_0331: Unknown result type (might be due to invalid IL or missing references)2059 //IL_0339: Unknown result type (might be due to invalid IL or missing references)2060 //IL_03e1: Unknown result type (might be due to invalid IL or missing references)2061 //IL_03e6: Unknown result type (might be due to invalid IL or missing references)2062 //IL_03ee: Unknown result type (might be due to invalid IL or missing references)2063 //IL_045b: Unknown result type (might be due to invalid IL or missing references)2064 //IL_0460: Unknown result type (might be due to invalid IL or missing references)2065 //IL_0468: Unknown result type (might be due to invalid IL or missing references)2066 //IL_04c9: Unknown result type (might be due to invalid IL or missing references)2067 //IL_04ce: Unknown result type (might be due to invalid IL or missing references)2068 //IL_04d6: Unknown result type (might be due to invalid IL or missing references)2069 //IL_0540: Unknown result type (might be due to invalid IL or missing references)2070 //IL_0545: Unknown result type (might be due to invalid IL or missing references)2071 //IL_054d: Unknown result type (might be due to invalid IL or missing references)2072 //IL_05fe: Unknown result type (might be due to invalid IL or missing references)2073 //IL_0603: Unknown result type (might be due to invalid IL or missing references)2074 //IL_060b: Unknown result type (might be due to invalid IL or missing references)2075 //IL_0053: Unknown result type (might be due to invalid IL or missing references)2076 //IL_0502: Unknown result type (might be due to invalid IL or missing references)2077 //IL_0507: Unknown result type (might be due to invalid IL or missing references)2078 //IL_050b: Unknown result type (might be due to invalid IL or missing references)2079 //IL_0510: Unknown result type (might be due to invalid IL or missing references)2080 //IL_00ef: Unknown result type (might be due to invalid IL or missing references)2081 //IL_00f4: Unknown result type (might be due to invalid IL or missing references)2082 //IL_00f7: Unknown result type (might be due to invalid IL or missing references)2083 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)2084 //IL_01cd: Unknown result type (might be due to invalid IL or missing references)2085 //IL_01d2: Unknown result type (might be due to invalid IL or missing references)2086 //IL_01d5: Unknown result type (might be due to invalid IL or missing references)2087 //IL_01da: Unknown result type (might be due to invalid IL or missing references)2088 //IL_015a: Unknown result type (might be due to invalid IL or missing references)2089 //IL_015f: Unknown result type (might be due to invalid IL or missing references)2090 //IL_0163: Unknown result type (might be due to invalid IL or missing references)2091
…