Back to OIM Explorer

QER.CompositionApi/QER.CompositionApi.ITShop/ShoppingCartSubmit.cs

Decompiler Source FileQER.CompositionApi.ShoppingCartSubmitDecompiled Source

2 extracted method/event/call references in ShoppingCartSubmit.

Source: F:\Claude\.tmp\oim-decompiled-full\0989_One_Identity_Manager_QER.CompositionApi.dll\QER.CompositionApi.ITShop\ShoppingCartSubmit.cs

Source size: 78.676 characters

Interpretation

  • Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.

Relations

  • CallFunctionAsync: OrderShoppingCart at line 576
  • CallFunctionAsync: OrderShoppingCart at line 1669

Typed Edges

  • No typed edges extracted for this source.

References

  • No direct source references extracted.

Referenced By

  • No direct source references extracted.

C# source-derived context

Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.

reads entity values references DB/Dialog objects IT Shop related markers

Summary: classes ShoppingCartSubmit, _003C_003Ec__DisplayClass15_0, _003C_003Ec__DisplayClass15_1, _003C_003Ec__DisplayClass15_2; methods _003CCheckAsync_003Eb__3, _003CCheckAsync_003Eb__0, _003CCheckAsync_003Eb__2, _003CCheckAsync_003Eb__4, MoveNext, SetStateMachine; references AccProduct, Person, PersonWantsOrg, ShoppingCartItem, ShoppingCartOrder; markers reads entity values, references DB/Dialog objects, IT Shop related markers

Classes

ShoppingCartSubmit _003C_003Ec__DisplayClass15_0 _003C_003Ec__DisplayClass15_1 _003C_003Ec__DisplayClass15_2 _003C_003Ec__DisplayClass15_3

OIM key/entity markers

UID_Person UID_ShoppingCartOrder UID_ShoppingCartItem

API/entity calls

GetValue User Source CommitTransactionAsync StartUnitOfWork StartTempQueueAsync RollbackTransactionAsync BeginTransactionAsync From SqlFormatter PutValueAsync

Registrations / handlers

None extracted.

Complete Source

C#1.780 lines
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Diagnostics;5using System.Linq;6using System.Runtime.CompilerServices;7using System.Runtime.ExceptionServices;8using System.Runtime.InteropServices;9using System.Text.Json;10using System.Threading;11using System.Threading.Tasks;12using NLog;13using QBM.CompositionApi.Cache;14using QBM.CompositionApi.Components;15using QBM.CompositionApi.PlugIns;16using QBM.CompositionApi.Serialization;17using QER.CompositionApi.Cache;18using QER.CompositionApi.ITShop.Check;19using QER.CompositionApi.ITShop.Component;20using QER.Customizer;21using VI.Base;22using VI.DB;23using VI.DB.Entities;2425namespace QER.CompositionApi.ITShop;2627public class ShoppingCartSubmit28{29	[CompilerGenerated]30	private sealed class _003C_003Ec__DisplayClass15_031	{32		public OrderInfo orderInfo;3334		public Func<CartItemCheckResult, bool> _003C_003E9__3;3536		internal bool _003CCheckAsync_003Eb__3(CartItemCheckResult o)37		{38			_003C_003Ec__DisplayClass15_3 CS_0024_003C_003E8__locals1 = new _003C_003Ec__DisplayClass15_339			{40				o = o41			};42			return Enumerable.All<ItemInfo>((System.Collections.Generic.IEnumerable<ItemInfo>)orderInfo.Items, (Func<ItemInfo, bool>)((ItemInfo i) => i.UidShoppingCartItem != CS_0024_003C_003E8__locals1.o.UidShoppingCartItem));43		}44	}4546	[CompilerGenerated]47	private sealed class _003C_003Ec__DisplayClass15_148	{49		public ItemInfo item;5051		internal bool _003CCheckAsync_003Eb__0(CartItemCheckResult i)52		{53			return i.UidShoppingCartItem == item.UidShoppingCartItem;54		}55	}5657	[CompilerGenerated]58	private sealed class _003C_003Ec__DisplayClass15_259	{60		public ItemInfo item;6162		internal bool _003CCheckAsync_003Eb__2(CartItemCheckResult i)63		{64			return object.Equals((object)i.UidShoppingCartItem, (object)item.UidShoppingCartItem);65		}66	}6768	[CompilerGenerated]69	private sealed class _003C_003Ec__DisplayClass15_370	{71		public CartItemCheckResult o;7273		internal bool _003CCheckAsync_003Eb__4(ItemInfo i)74		{75			return i.UidShoppingCartItem != o.UidShoppingCartItem;76		}77	}7879	[StructLayout((LayoutKind)3)]80	[CompilerGenerated]81	private struct _003CCheckAsync_003Ed__10 : IAsyncStateMachine82	{83		public int _003C_003E1__state;8485		public AsyncTaskMethodBuilder<CartCheckResult> _003C_003Et__builder;8687		public ShoppingCartSubmit _003C_003E4__this;8889		public ISession session;9091		public CancellationToken ct;9293		private ConfiguredTaskAwaiter<CartCheckResult> _003C_003Eu__1;9495		private void MoveNext()96		{97			//IL_006e: Unknown result type (might be due to invalid IL or missing references)98			//IL_0073: Unknown result type (might be due to invalid IL or missing references)99			//IL_007a: Unknown result type (might be due to invalid IL or missing references)100			//IL_002a: Unknown result type (might be due to invalid IL or missing references)101			//IL_0035: Unknown result type (might be due to invalid IL or missing references)102			//IL_003a: Unknown result type (might be due to invalid IL or missing references)103			//IL_003e: Unknown result type (might be due to invalid IL or missing references)104			//IL_0043: Unknown result type (might be due to invalid IL or missing references)105			//IL_0057: Unknown result type (might be due to invalid IL or missing references)106			//IL_0058: Unknown result type (might be due to invalid IL or missing references)107			int num = _003C_003E1__state;108			ShoppingCartSubmit shoppingCartSubmit = _003C_003E4__this;109			CartCheckResult result;110			try111			{112				ConfiguredTaskAwaiter<CartCheckResult> val;113				if (num != 0)114				{115					shoppingCartSubmit.Check.Config.CheckMode = CheckMode.CheckOnly;116					val = shoppingCartSubmit.RunAsync(session, ct).ConfigureAwait(false).GetAwaiter();117					if (!val.IsCompleted)118					{119						num = (_003C_003E1__state = 0);120						_003C_003Eu__1 = val;121						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<CartCheckResult>, _003CCheckAsync_003Ed__10>(ref val, ref this);122						return;123					}124				}125				else126				{127					val = _003C_003Eu__1;128					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<CartCheckResult>);129					num = (_003C_003E1__state = -1);130				}131				result = val.GetResult();132			}133			catch (System.Exception exception)134			{135				_003C_003E1__state = -2;136				_003C_003Et__builder.SetException(exception);137				return;138			}139			_003C_003E1__state = -2;140			_003C_003Et__builder.SetResult(result);141		}142143		[DebuggerHidden]144		private void SetStateMachine(IAsyncStateMachine stateMachine)145		{146			_003C_003Et__builder.SetStateMachine(stateMachine);147		}148	}149150	[StructLayout((LayoutKind)3)]151	[CompilerGenerated]152	private struct _003CCheckAsync_003Ed__15 : IAsyncStateMachine153	{154		public int _003C_003E1__state;155156		public AsyncTaskMethodBuilder<CartCheckResult> _003C_003Et__builder;157158		public ShoppingCartSubmit _003C_003E4__this;159160		public ISession session;161162		public CancellationToken ct;163164		public IEntity scOrder;165166		private _003C_003Ec__DisplayClass15_0 _003C_003E8__1;167168		private Cart _003Ccart_003E5__2;169170		private CartCheckResult _003CcheckResult_003E5__3;171172		private CheckMode _003Cmode_003E5__4;173174		private bool _003Ccommit_003E5__5;175176		private bool _003Ccommitted_003E5__6;177178		private ConfiguredTaskAwaiter<Cart> _003C_003Eu__1;179180		private ConfiguredTaskAwaiter<CartCheckResult> _003C_003Eu__2;181182		private ConfiguredTaskAwaiter _003C_003Eu__3;183184		private object _003C_003E7__wrap6;185186		private int _003C_003E7__wrap7;187188		private CartCheckResult _003C_003E7__wrap8;189190		private string _003CuidPerson_003E5__10;191192		private CartItemData _003Cpresubmit_003E5__11;193194		private IEntity _003CpersonObj_003E5__12;195196		private System.Collections.Generic.IEnumerator<CartItem> _003C_003E7__wrap12;197198		private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__4;199200		private ConfiguredValueTaskAwaiter<object> _003C_003Eu__5;201202		private IUnitOfWork _003Cu_003E5__14;203204		private System.Collections.Generic.IEnumerator<ICartPostSubmitCheck> _003C_003E7__wrap14;205206		private void MoveNext()207		{208			//IL_009a: Unknown result type (might be due to invalid IL or missing references)209			//IL_009f: Unknown result type (might be due to invalid IL or missing references)210			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)211			//IL_0121: Unknown result type (might be due to invalid IL or missing references)212			//IL_0126: Unknown result type (might be due to invalid IL or missing references)213			//IL_012e: Unknown result type (might be due to invalid IL or missing references)214			//IL_0207: Unknown result type (might be due to invalid IL or missing references)215			//IL_020c: Unknown result type (might be due to invalid IL or missing references)216			//IL_0214: Unknown result type (might be due to invalid IL or missing references)217			//IL_0b2b: Unknown result type (might be due to invalid IL or missing references)218			//IL_0b30: Unknown result type (might be due to invalid IL or missing references)219			//IL_0b38: Unknown result type (might be due to invalid IL or missing references)220			//IL_0051: Unknown result type (might be due to invalid IL or missing references)221			//IL_005c: Unknown result type (might be due to invalid IL or missing references)222			//IL_0061: Unknown result type (might be due to invalid IL or missing references)223			//IL_0065: Unknown result type (might be due to invalid IL or missing references)224			//IL_006a: Unknown result type (might be due to invalid IL or missing references)225			//IL_0ae1: Unknown result type (might be due to invalid IL or missing references)226			//IL_0aec: Unknown result type (might be due to invalid IL or missing references)227			//IL_0af1: Unknown result type (might be due to invalid IL or missing references)228			//IL_0af5: Unknown result type (might be due to invalid IL or missing references)229			//IL_0afa: Unknown result type (might be due to invalid IL or missing references)230			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)231			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)232			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)233			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)234			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)235			//IL_007f: Unknown result type (might be due to invalid IL or missing references)236			//IL_0081: Unknown result type (might be due to invalid IL or missing references)237			//IL_0b10: Unknown result type (might be due to invalid IL or missing references)238			//IL_0b12: Unknown result type (might be due to invalid IL or missing references)239			//IL_0106: Unknown result type (might be due to invalid IL or missing references)240			//IL_0108: Unknown result type (might be due to invalid IL or missing references)241			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)242			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)243			//IL_03fd: Unknown result type (might be due to invalid IL or missing references)244			//IL_046d: Unknown result type (might be due to invalid IL or missing references)245			//IL_0472: Unknown result type (might be due to invalid IL or missing references)246			//IL_047a: Unknown result type (might be due to invalid IL or missing references)247			//IL_04f5: Unknown result type (might be due to invalid IL or missing references)248			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)249			//IL_0502: Unknown result type (might be due to invalid IL or missing references)250			//IL_0a6a: Unknown result type (might be due to invalid IL or missing references)251			//IL_0a6f: Unknown result type (might be due to invalid IL or missing references)252			//IL_0a77: Unknown result type (might be due to invalid IL or missing references)253			//IL_01be: Unknown result type (might be due to invalid IL or missing references)254			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)255			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)256			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)257			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)258			//IL_0424: Unknown result type (might be due to invalid IL or missing references)259			//IL_042f: Unknown result type (might be due to invalid IL or missing references)260			//IL_0434: Unknown result type (might be due to invalid IL or missing references)261			//IL_0438: Unknown result type (might be due to invalid IL or missing references)262			//IL_043d: Unknown result type (might be due to invalid IL or missing references)263			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)264			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)265			//IL_04bc: Unknown result type (might be due to invalid IL or missing references)266			//IL_04c0: Unknown result type (might be due to invalid IL or missing references)267			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)268			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)269			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)270			//IL_0336: Unknown result type (might be due to invalid IL or missing references)271			//IL_033b: Unknown result type (might be due to invalid IL or missing references)272			//IL_0343: Unknown result type (might be due to invalid IL or missing references)273			//IL_0452: Unknown result type (might be due to invalid IL or missing references)274			//IL_0454: Unknown result type (might be due to invalid IL or missing references)275			//IL_04da: Unknown result type (might be due to invalid IL or missing references)276			//IL_04dc: Unknown result type (might be due to invalid IL or missing references)277			//IL_0851: Unknown result type (might be due to invalid IL or missing references)278			//IL_0856: Unknown result type (might be due to invalid IL or missing references)279			//IL_085e: Unknown result type (might be due to invalid IL or missing references)280			//IL_0991: Unknown result type (might be due to invalid IL or missing references)281			//IL_0996: Unknown result type (might be due to invalid IL or missing references)282			//IL_099e: Unknown result type (might be due to invalid IL or missing references)283			//IL_087b: Unknown result type (might be due to invalid IL or missing references)284			//IL_0886: Unknown result type (might be due to invalid IL or missing references)285			//IL_088b: Unknown result type (might be due to invalid IL or missing references)286			//IL_088f: Unknown result type (might be due to invalid IL or missing references)287			//IL_0894: Unknown result type (might be due to invalid IL or missing references)288			//IL_08c4: Unknown result type (might be due to invalid IL or missing references)289			//IL_08c9: Unknown result type (might be due to invalid IL or missing references)290			//IL_08d1: Unknown result type (might be due to invalid IL or missing references)291			//IL_0808: Unknown result type (might be due to invalid IL or missing references)292			//IL_0813: Unknown result type (might be due to invalid IL or missing references)293			//IL_0818: Unknown result type (might be due to invalid IL or missing references)294			//IL_081c: Unknown result type (might be due to invalid IL or missing references)295			//IL_0821: Unknown result type (might be due to invalid IL or missing references)296			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)297			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)298			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)299			//IL_0301: Unknown result type (might be due to invalid IL or missing references)300			//IL_0306: Unknown result type (might be due to invalid IL or missing references)301			//IL_08a9: Unknown result type (might be due to invalid IL or missing references)302			//IL_08ab: Unknown result type (might be due to invalid IL or missing references)303			//IL_0836: Unknown result type (might be due to invalid IL or missing references)304			//IL_0838: Unknown result type (might be due to invalid IL or missing references)305			//IL_0947: Unknown result type (might be due to invalid IL or missing references)306			//IL_0952: Unknown result type (might be due to invalid IL or missing references)307			//IL_0957: Unknown result type (might be due to invalid IL or missing references)308			//IL_095b: Unknown result type (might be due to invalid IL or missing references)309			//IL_0960: Unknown result type (might be due to invalid IL or missing references)310			//IL_031b: Unknown result type (might be due to invalid IL or missing references)311			//IL_031d: Unknown result type (might be due to invalid IL or missing references)312			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)313			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)314			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)315			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)316			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)317			//IL_0976: Unknown result type (might be due to invalid IL or missing references)318			//IL_0978: Unknown result type (might be due to invalid IL or missing references)319			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)320			//IL_03d7: Unknown result type (might be due to invalid IL or missing references)321			//IL_0a20: Unknown result type (might be due to invalid IL or missing references)322			//IL_0a2b: Unknown result type (might be due to invalid IL or missing references)323			//IL_0a30: Unknown result type (might be due to invalid IL or missing references)324			//IL_0a34: Unknown result type (might be due to invalid IL or missing references)325			//IL_0a39: Unknown result type (might be due to invalid IL or missing references)326			//IL_0a4f: Unknown result type (might be due to invalid IL or missing references)327			//IL_0a51: Unknown result type (might be due to invalid IL or missing references)328			int num = _003C_003E1__state;329			ShoppingCartSubmit shoppingCartSubmit = _003C_003E4__this;330			CartCheckResult result3;331			try332			{333				ConfiguredTaskAwaiter<Cart> val3;334				ConfiguredTaskAwaiter<CartCheckResult> val2;335				ConfiguredTaskAwaiter val;336				ConfiguredTaskAwaitable val4;337				Cart result;338				CartCheckResult result2;339				object result4;340				int i;341				switch (num)342				{343				default:344					val3 = shoppingCartSubmit.Check.GetCartAsync(session, ct).ConfigureAwait(false).GetAwaiter();345					if (!val3.IsCompleted)346					{347						num = (_003C_003E1__state = 0);348						_003C_003Eu__1 = val3;349						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<Cart>, _003CCheckAsync_003Ed__15>(ref val3, ref this);350						return;351					}352					goto IL_00b6;353				case 0:354					val3 = _003C_003Eu__1;355					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<Cart>);356					num = (_003C_003E1__state = -1);357					goto IL_00b6;358				case 1:359					val2 = _003C_003Eu__2;360					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<CartCheckResult>);361					num = (_003C_003E1__state = -1);362					goto IL_013d;363				case 2:364					val = _003C_003Eu__3;365					_003C_003Eu__3 = default(ConfiguredTaskAwaiter);366					num = (_003C_003E1__state = -1);367					goto IL_0223;368				case 3:369				case 4:370				case 5:371				case 6:372				case 7:373				case 8:374				case 9:375				case 10:376					try377					{378						ConfiguredTaskAwaiter<IEntity> val6;379						ConfiguredValueTaskAwaiter<object> val5;380						ItemInfo[] items;381						System.Collections.Generic.IEnumerator<ItemInfo> enumerator;382						System.Collections.Generic.IEnumerator<CartItemCheckResult> enumerator2;383						IEntity result5;384						switch (num)385						{386						default:387							_003C_003E8__1 = new _003C_003Ec__DisplayClass15_0();388							_003CuidPerson_003E5__10 = session.User().Uid;389							if (string.IsNullOrEmpty(_003CuidPerson_003E5__10))390							{391								_003CuidPerson_003E5__10 = scOrder.GetValue<string>("UID_Person");392							}393							_003Cpresubmit_003E5__11 = new CartItemData(CartItemAction.PreSubmit, session);394							_003C_003E7__wrap12 = ((System.Collections.Generic.IEnumerable<CartItem>)_003Ccart_003E5__2.CartItems).GetEnumerator();395							goto case 3;396						case 3:397							try398							{399								if (num != 3)400								{401									goto IL_0359;402								}403								val = _003C_003Eu__3;404								_003C_003Eu__3 = default(ConfiguredTaskAwaiter);405								num = (_003C_003E1__state = -1);406								goto IL_0352;407								IL_0352:408								((ConfiguredTaskAwaiter)(ref val)).GetResult();409								goto IL_0359;410								IL_0359:411								if (((System.Collections.IEnumerator)_003C_003E7__wrap12).MoveNext())412								{413									val4 = _003C_003E7__wrap12.Current.OnNextAsync(_003Cpresubmit_003E5__11, ct).ConfigureAwait(false);414									val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();415									if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)416									{417										num = (_003C_003E1__state = 3);418										_003C_003Eu__3 = val;419										_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);420										return;421									}422									goto IL_0352;423								}424							}425							finally426							{427								if (num < 0 && _003C_003E7__wrap12 != null)428								{429									((System.IDisposable)_003C_003E7__wrap12).Dispose();430								}431							}432							_003C_003E7__wrap12 = null;433							val6 = session.Source().GetAsync(new DbObjectKey("Person", _003CuidPerson_003E5__10), EntityLoadType.Interactive, ct).ConfigureAwait(false)434								.GetAwaiter();435							if (!val6.IsCompleted)436							{437								num = (_003C_003E1__state = 4);438								_003C_003Eu__4 = val6;439								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CCheckAsync_003Ed__15>(ref val6, ref this);440								return;441							}442							goto IL_040c;443						case 4:444							val6 = _003C_003Eu__4;445							_003C_003Eu__4 = default(ConfiguredTaskAwaiter<IEntity>);446							num = (_003C_003E1__state = -1);447							goto IL_040c;448						case 5:449							val = _003C_003Eu__3;450							_003C_003Eu__3 = default(ConfiguredTaskAwaiter);451							num = (_003C_003E1__state = -1);452							goto IL_0489;453						case 6:454							val5 = _003C_003Eu__5;455							_003C_003Eu__5 = default(ConfiguredValueTaskAwaiter<object>);456							num = (_003C_003E1__state = -1);457							goto IL_0511;458						case 7:459						case 8:460							try461							{462								if (num != 7)463								{464									if (num == 8)465									{466										val = _003C_003Eu__3;467										_003C_003Eu__3 = default(ConfiguredTaskAwaiter);468										num = (_003C_003E1__state = -1);469										goto IL_08e0;470									}471									val4 = _003Cu_003E5__14.PutAsync(_003CpersonObj_003E5__12, ct).ConfigureAwait(false);472									val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();473									if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)474									{475										num = (_003C_003E1__state = 7);476										_003C_003Eu__3 = val;477										_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);478										return;479									}480								}481								else482								{483									val = _003C_003Eu__3;484									_003C_003Eu__3 = default(ConfiguredTaskAwaiter);485									num = (_003C_003E1__state = -1);486								}487								((ConfiguredTaskAwaiter)(ref val)).GetResult();488								val4 = _003Cu_003E5__14.CommitAsync(ct).ConfigureAwait(false);489								val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();490								if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)491								{492									num = (_003C_003E1__state = 8);493									_003C_003Eu__3 = val;494									_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);495									return;496								}497								goto IL_08e0;498								IL_08e0:499								((ConfiguredTaskAwaiter)(ref val)).GetResult();500							}501							finally502							{503								if (num < 0 && _003Cu_003E5__14 != null)504								{505									((System.IDisposable)_003Cu_003E5__14).Dispose();506								}507							}508							_003Cu_003E5__14 = null;509							_003C_003E7__wrap14 = ((System.Collections.Generic.IEnumerable<ICartPostSubmitCheck>)shoppingCartSubmit.PostSubmitChecks).GetEnumerator();510							goto case 9;511						case 9:512							try513							{514								if (num != 9)515								{516									goto IL_09b4;517								}518								val = _003C_003Eu__3;519								_003C_003Eu__3 = default(ConfiguredTaskAwaiter);520								num = (_003C_003E1__state = -1);521								goto IL_09ad;522								IL_09ad:523								((ConfiguredTaskAwaiter)(ref val)).GetResult();524								goto IL_09b4;525								IL_09b4:526								if (((System.Collections.IEnumerator)_003C_003E7__wrap14).MoveNext())527								{528									val4 = _003C_003E7__wrap14.Current.CheckAsync(session, _003C_003E8__1.orderInfo, _003CcheckResult_003E5__3, ct).ConfigureAwait(false);529									val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();530									if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)531									{532										num = (_003C_003E1__state = 9);533										_003C_003Eu__3 = val;534										_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);535										return;536									}537									goto IL_09ad;538								}539							}540							finally541							{542								if (num < 0 && _003C_003E7__wrap14 != null)543								{544									((System.IDisposable)_003C_003E7__wrap14).Dispose();545								}546							}547							_003C_003E7__wrap14 = null;548							if (!_003Ccommit_003E5__5 || _003CcheckResult_003E5__3.HasErrors || (_003CcheckResult_003E5__3.HasWarnings && _003Cmode_003E5__4 != CheckMode.SubmitWithWarnings))549							{550								break;551							}552							val4 = session.CommitTransactionAsync(ct).ConfigureAwait(false);553							val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();554							if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)555							{556								num = (_003C_003E1__state = 10);557								_003C_003Eu__3 = val;558								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);559								return;560							}561							goto IL_0a86;562						case 10:563							{564								val = _003C_003Eu__3;565								_003C_003Eu__3 = default(ConfiguredTaskAwaiter);566								num = (_003C_003E1__state = -1);567								goto IL_0a86;568							}569							IL_0a86:570							((ConfiguredTaskAwaiter)(ref val)).GetResult();571							_003Ccommitted_003E5__6 = true;572							_003CcheckResult_003E5__3.Submitted = true;573							break;574							IL_0489:575							((ConfiguredTaskAwaiter)(ref val)).GetResult();576							val5 = _003CpersonObj_003E5__12.CallFunctionAsync("OrderShoppingCart", shoppingCartSubmit.Check.UidShoppingCartOrder, p2: true, ct).ConfigureAwait(false).GetAwaiter();577							if (!val5.IsCompleted)578							{579								num = (_003C_003E1__state = 6);580								_003C_003Eu__5 = val5;581								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<object>, _003CCheckAsync_003Ed__15>(ref val5, ref this);582								return;583							}584							goto IL_0511;585							IL_0511:586							result4 = val5.GetResult();587							_003C_003E8__1.orderInfo = (OrderInfo)result4;588							items = _003C_003E8__1.orderInfo.Items;589							for (i = 0; i < items.Length; i++)590							{591								_003C_003Ec__DisplayClass15_1 CS_0024_003C_003E8__locals8 = new _003C_003Ec__DisplayClass15_1592								{593									item = items[i]594								};595								CartItemCheckResult cartItemCheckResult = Enumerable.FirstOrDefault<CartItemCheckResult>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)_003CcheckResult_003E5__3.Items, (Func<CartItemCheckResult, bool>)((CartItemCheckResult cartItemCheckResult3) => cartItemCheckResult3.UidShoppingCartItem == CS_0024_003C_003E8__locals8.item.UidShoppingCartItem));596								if (cartItemCheckResult != null)597								{598									cartItemCheckResult.UidPersonWantsOrg = CS_0024_003C_003E8__locals8.item.UidPersonWantsOrg;599								}600							}601							if (_003C_003E8__1.orderInfo.Succeeded)602							{603								_003Cu_003E5__14 = session.StartUnitOfWork();604								goto case 7;605							}606							enumerator = Enumerable.Where<ItemInfo>((System.Collections.Generic.IEnumerable<ItemInfo>)_003C_003E8__1.orderInfo.Items, (Func<ItemInfo, bool>)((ItemInfo itemInfo) => itemInfo.Error != null)).GetEnumerator();607							try608							{609								while (((System.Collections.IEnumerator)enumerator).MoveNext())610								{611									_003C_003Ec__DisplayClass15_2 CS_0024_003C_003E8__locals9 = new _003C_003Ec__DisplayClass15_2612									{613										item = enumerator.Current614									};615									CartItemCheckResult cartItemCheckResult2 = Enumerable.FirstOrDefault<CartItemCheckResult>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)_003CcheckResult_003E5__3.Items, (Func<CartItemCheckResult, bool>)((CartItemCheckResult cartItemCheckResult3) => object.Equals((object)cartItemCheckResult3.UidShoppingCartItem, (object)CS_0024_003C_003E8__locals9.item.UidShoppingCartItem)));616									SubmitException ex = new SubmitException(CS_0024_003C_003E8__locals9.item.Error);617									if (cartItemCheckResult2 != null)618									{619										cartItemCheckResult2.Results = Enumerable.ToArray<ICartItemCheckResult>(cartItemCheckResult2.Results.AvoidNull().Concat(ex));620										RequestableCheck requestableCheck = Enumerable.Single<RequestableCheck>(Enumerable.OfType<RequestableCheck>((System.Collections.IEnumerable)(object)cartItemCheckResult2.Checks));621										if (ex.HasErrors)622										{623											requestableCheck.Detail.Exception = CS_0024_003C_003E8__locals9.item.Error;624										}625										else if (ex.HasWarnings)626										{627											requestableCheck.Detail.Warning = CS_0024_003C_003E8__locals9.item.Error;628										}629									}630									else631									{632										Logger.Warn("No matching cart item (" + CS_0024_003C_003E8__locals9.item.UidShoppingCartItem + ") found for exception: " + CS_0024_003C_003E8__locals9.item.Error.Message);633									}634								}635							}636							finally637							{638								if (num < 0)639								{640									((System.IDisposable)enumerator)?.Dispose();641								}642							}643							enumerator2 = Enumerable.Where<CartItemCheckResult>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)_003CcheckResult_003E5__3.Items, (Func<CartItemCheckResult, bool>)delegate(CartItemCheckResult o)644							{645								_003C_003Ec__DisplayClass15_3 CS_0024_003C_003E8__locals11 = new _003C_003Ec__DisplayClass15_3646								{647									o = o648								};649								return Enumerable.All<ItemInfo>((System.Collections.Generic.IEnumerable<ItemInfo>)_003C_003E8__1.orderInfo.Items, (Func<ItemInfo, bool>)((ItemInfo itemInfo) => itemInfo.UidShoppingCartItem != CS_0024_003C_003E8__locals11.o.UidShoppingCartItem));650							}).GetEnumerator();651							try652							{653								while (((System.Collections.IEnumerator)enumerator2).MoveNext())654								{655									CartItemCheckResult current = enumerator2.Current;656									SubmitException ex2 = new SubmitException(ExceptionInfo.FromException((System.Exception?)(object)new ViException(6047003, ExceptionRelevance.EndUser)))657									{658										HasWarnings = true659									};660									current.Results = Enumerable.ToArray<ICartItemCheckResult>(current.Results.AvoidNull().Concat(ex2));661									Enumerable.Single<RequestableCheck>(Enumerable.OfType<RequestableCheck>((System.Collections.IEnumerable)(object)current.Checks)).Detail.Warning = ex2.Exception;662								}663							}664							finally665							{666								if (num < 0)667								{668									((System.IDisposable)enumerator2)?.Dispose();669								}670							}671							_003C_003E7__wrap8 = _003CcheckResult_003E5__3;672							_003C_003E7__wrap7 = 1;673							goto end_IL_0240;674							IL_040c:675							result5 = val6.GetResult();676							_003CpersonObj_003E5__12 = result5;677							val4 = session.StartTempQueueAsync(ct).ConfigureAwait(false);678							val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();679							if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)680							{681								num = (_003C_003E1__state = 5);682								_003C_003Eu__3 = val;683								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);684								return;685							}686							goto IL_0489;687						}688						_003C_003E8__1 = null;689						_003CuidPerson_003E5__10 = null;690						_003Cpresubmit_003E5__11 = null;691						_003CpersonObj_003E5__12 = null;692						end_IL_0240:;693					}694					catch (object obj)695					{696						_003C_003E7__wrap6 = obj;697					}698					if (_003Ccommitted_003E5__6)699					{700						break;701					}702					val4 = session.RollbackTransactionAsync(CancellationToken.None).ConfigureAwait(false);703					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();704					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)705					{706						num = (_003C_003E1__state = 11);707						_003C_003Eu__3 = val;708						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);709						return;710					}711					goto IL_0b47;712				case 11:713					{714						val = _003C_003Eu__3;715						_003C_003Eu__3 = default(ConfiguredTaskAwaiter);716						num = (_003C_003E1__state = -1);717						goto IL_0b47;718					}719					IL_0b47:720					((ConfiguredTaskAwaiter)(ref val)).GetResult();721					break;722					IL_00b6:723					result = val3.GetResult();724					_003Ccart_003E5__2 = result;725					val2 = shoppingCartSubmit.Check.CheckAsync(session, _003Ccart_003E5__2, ct).ConfigureAwait(false).GetAwaiter();726					if (!val2.IsCompleted)727					{728						num = (_003C_003E1__state = 1);729						_003C_003Eu__2 = val2;730						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<CartCheckResult>, _003CCheckAsync_003Ed__15>(ref val2, ref this);731						return;732					}733					goto IL_013d;734					IL_0223:735					((ConfiguredTaskAwaiter)(ref val)).GetResult();736					_003Ccommitted_003E5__6 = false;737					_003C_003E7__wrap6 = null;738					_003C_003E7__wrap7 = 0;739					goto case 3;740					IL_013d:741					result2 = val2.GetResult();742					_003CcheckResult_003E5__3 = result2;743					if (!_003CcheckResult_003E5__3.HasErrors)744					{745						_003Cmode_003E5__4 = shoppingCartSubmit.Check.Config.CheckMode;746						_003Ccommit_003E5__5 = _003Cmode_003E5__4 != CheckMode.CheckOnly;747						if (_003Ccommit_003E5__5 && !_003CcheckResult_003E5__3.CanCommitSilently)748						{749							Logger.Debug("Cannot commit silently. Not committing shopping cart.");750							_003Ccommit_003E5__5 = false;751						}752						val4 = session.BeginTransactionAsync(ct).ConfigureAwait(false);753						val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();754						if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)755						{756							num = (_003C_003E1__state = 2);757							_003C_003Eu__3 = val;758							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCheckAsync_003Ed__15>(ref val, ref this);759							return;760						}761						goto IL_0223;762					}763					result3 = _003CcheckResult_003E5__3;764					goto end_IL_000e;765				}766				result4 = _003C_003E7__wrap6;767				if (result4 != null)768				{769					ExceptionDispatchInfo.Capture((result4 as System.Exception) ?? throw result4).Throw();770				}771				i = _003C_003E7__wrap7;772				if (i == 1)773				{774					result3 = _003C_003E7__wrap8;775				}776				else777				{778					_003C_003E7__wrap6 = null;779					_003C_003E7__wrap8 = null;780					result3 = _003CcheckResult_003E5__3;781				}782				end_IL_000e:;783			}784			catch (System.Exception exception)785			{786				_003C_003E1__state = -2;787				_003C_003Et__builder.SetException(exception);788				return;789			}790			_003C_003E1__state = -2;791			_003C_003Et__builder.SetResult(result3);792		}793794		[DebuggerHidden]795		private void SetStateMachine(IAsyncStateMachine stateMachine)796		{797			_003C_003Et__builder.SetStateMachine(stateMachine);798		}799	}800801	[StructLayout((LayoutKind)3)]802	[CompilerGenerated]803	private struct _003CLoadShoppingCartOrderAsync_003Ed__12 : IAsyncStateMachine804	{805		public int _003C_003E1__state;806807		public AsyncTaskMethodBuilder<IEntity> _003C_003Et__builder;808809		public ISession session;810811		public ShoppingCartSubmit _003C_003E4__this;812813		public CancellationToken ct;814815		private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__1;816817		private void MoveNext()818		{819			//IL_0077: Unknown result type (might be due to invalid IL or missing references)820			//IL_007c: Unknown result type (might be due to invalid IL or missing references)821			//IL_0083: Unknown result type (might be due to invalid IL or missing references)822			//IL_0033: Unknown result type (might be due to invalid IL or missing references)823			//IL_003e: Unknown result type (might be due to invalid IL or missing references)824			//IL_0043: Unknown result type (might be due to invalid IL or missing references)825			//IL_0047: Unknown result type (might be due to invalid IL or missing references)826			//IL_004c: Unknown result type (might be due to invalid IL or missing references)827			//IL_0060: Unknown result type (might be due to invalid IL or missing references)828			//IL_0061: Unknown result type (might be due to invalid IL or missing references)829			int num = _003C_003E1__state;830			ShoppingCartSubmit shoppingCartSubmit = _003C_003E4__this;831			IEntity result;832			try833			{834				ConfiguredTaskAwaiter<IEntity> val;835				if (num != 0)836				{837					val = session.Source().GetAsync(new DbObjectKey("ShoppingCartOrder", shoppingCartSubmit.Check.UidShoppingCartOrder), EntityLoadType.DelayedLogic, ct).ConfigureAwait(false)838						.GetAwaiter();839					if (!val.IsCompleted)840					{841						num = (_003C_003E1__state = 0);842						_003C_003Eu__1 = val;843						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CLoadShoppingCartOrderAsync_003Ed__12>(ref val, ref this);844						return;845					}846				}847				else848				{849					val = _003C_003Eu__1;850					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);851					num = (_003C_003E1__state = -1);852				}853				result = val.GetResult();854			}855			catch (System.Exception exception)856			{857				_003C_003E1__state = -2;858				_003C_003Et__builder.SetException(exception);859				return;860			}861			_003C_003E1__state = -2;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 _003CRunAsync_003Ed__13 : IAsyncStateMachine875	{876		public int _003C_003E1__state;877878		public AsyncTaskMethodBuilder<CartCheckResult> _003C_003Et__builder;879880		public ShoppingCartSubmit _003C_003E4__this;881882		public ISession session;883884		public CancellationToken ct;885886		private ConfiguredTaskAwaiter<CartCheckResult> _003C_003Eu__1;887888		private void MoveNext()889		{890			//IL_007c: Unknown result type (might be due to invalid IL or missing references)891			//IL_0081: Unknown result type (might be due to invalid IL or missing references)892			//IL_0088: Unknown result type (might be due to invalid IL or missing references)893			//IL_0038: Unknown result type (might be due to invalid IL or missing references)894			//IL_0043: Unknown result type (might be due to invalid IL or missing references)895			//IL_0048: Unknown result type (might be due to invalid IL or missing references)896			//IL_004c: Unknown result type (might be due to invalid IL or missing references)897			//IL_0051: Unknown result type (might be due to invalid IL or missing references)898			//IL_0065: Unknown result type (might be due to invalid IL or missing references)899			//IL_0066: Unknown result type (might be due to invalid IL or missing references)900			int num = _003C_003E1__state;901			ShoppingCartSubmit shoppingCartSubmit = _003C_003E4__this;902			CartCheckResult result;903			try904			{905				ConfiguredTaskAwaiter<CartCheckResult> val;906				if (num != 0)907				{908					val = shoppingCartSubmit.RunAsync(session, (CartCheckResult _, IUnitOfWork __) => NullTask.Instance, ct).ConfigureAwait(false).GetAwaiter();909					if (!val.IsCompleted)910					{911						num = (_003C_003E1__state = 0);912						_003C_003Eu__1 = val;913						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<CartCheckResult>, _003CRunAsync_003Ed__13>(ref val, ref this);914						return;915					}916				}917				else918				{919					val = _003C_003Eu__1;920					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<CartCheckResult>);921					num = (_003C_003E1__state = -1);922				}923				result = val.GetResult();924			}925			catch (System.Exception exception)926			{927				_003C_003E1__state = -2;928				_003C_003Et__builder.SetException(exception);929				return;930			}931			_003C_003E1__state = -2;932			_003C_003Et__builder.SetResult(result);933		}934935		[DebuggerHidden]936		private void SetStateMachine(IAsyncStateMachine stateMachine)937		{938			_003C_003Et__builder.SetStateMachine(stateMachine);939		}940	}941942	[StructLayout((LayoutKind)3)]943	[CompilerGenerated]944	private struct _003CRunAsync_003Ed__14 : IAsyncStateMachine945	{946		public int _003C_003E1__state;947948		public AsyncTaskMethodBuilder<CartCheckResult> _003C_003Et__builder;949950		public ShoppingCartSubmit _003C_003E4__this;951952		public ISession session;953954		public CancellationToken ct;955956		public Func<CartCheckResult, IUnitOfWork, System.Threading.Tasks.Task> additionalTask;957958		private IEntity _003CscOrder_003E5__2;959960		private CartCheckResult _003Cresult_003E5__3;961962		private Dictionary<string, IEntity> _003Centities_003E5__4;963964		private Dictionary<string, CartItemCheckResult> _003CresultsByItem_003E5__5;965966		private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__1;967968		private ConfiguredTaskAwaiter<CartCheckResult> _003C_003Eu__2;969970		private ConfiguredValueTaskAwaiter<ApplyResult> _003C_003Eu__3;971972		private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__4;973974		private Enumerator<string, IEntity> _003C_003E7__wrap5;975976		private IEntity _003Centity_003E5__7;977978		private string _003CcheckResultDetail_003E5__8;979980		private IUnitOfWork _003Cu_003E5__9;981982		private ConfiguredTaskAwaiter _003C_003Eu__5;983984		private Enumerator<string, IEntity> _003C_003E7__wrap9;985986		private void MoveNext()987		{988			//IL_008d: Unknown result type (might be due to invalid IL or missing references)989			//IL_0092: Unknown result type (might be due to invalid IL or missing references)990			//IL_009a: Unknown result type (might be due to invalid IL or missing references)991			//IL_0111: Unknown result type (might be due to invalid IL or missing references)992			//IL_0116: Unknown result type (might be due to invalid IL or missing references)993			//IL_011e: Unknown result type (might be due to invalid IL or missing references)994			//IL_019d: Unknown result type (might be due to invalid IL or missing references)995			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)996			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)997			//IL_0252: Unknown result type (might be due to invalid IL or missing references)998			//IL_0257: Unknown result type (might be due to invalid IL or missing references)999			//IL_025f: Unknown result type (might be due to invalid IL or missing references)1000			//IL_0044: Unknown result type (might be due to invalid IL or missing references)1001			//IL_004f: Unknown result type (might be due to invalid IL or missing references)1002			//IL_0054: Unknown result type (might be due to invalid IL or missing references)1003			//IL_0058: Unknown result type (might be due to invalid IL or missing references)1004			//IL_005d: Unknown result type (might be due to invalid IL or missing references)1005			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)1006			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)1007			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)1008			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)1009			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)1010			//IL_0150: Unknown result type (might be due to invalid IL or missing references)1011			//IL_015f: Unknown result type (might be due to invalid IL or missing references)1012			//IL_0164: Unknown result type (might be due to invalid IL or missing references)1013			//IL_0168: Unknown result type (might be due to invalid IL or missing references)1014			//IL_016d: Unknown result type (might be due to invalid IL or missing references)1015			//IL_0209: Unknown result type (might be due to invalid IL or missing references)1016			//IL_0214: Unknown result type (might be due to invalid IL or missing references)1017			//IL_0219: Unknown result type (might be due to invalid IL or missing references)1018			//IL_021d: Unknown result type (might be due to invalid IL or missing references)1019			//IL_0222: Unknown result type (might be due to invalid IL or missing references)1020			//IL_0072: Unknown result type (might be due to invalid IL or missing references)1021			//IL_0074: Unknown result type (might be due to invalid IL or missing references)1022			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)1023			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)1024			//IL_0182: Unknown result type (might be due to invalid IL or missing references)1025			//IL_0184: Unknown result type (might be due to invalid IL or missing references)1026			//IL_0237: Unknown result type (might be due to invalid IL or missing references)1027			//IL_0239: Unknown result type (might be due to invalid IL or missing references)1028			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)1029			//IL_0400: Unknown result type (might be due to invalid IL or missing references)1030			//IL_0408: Unknown result type (might be due to invalid IL or missing references)1031			//IL_0565: Unknown result type (might be due to invalid IL or missing references)1032			//IL_056a: Unknown result type (might be due to invalid IL or missing references)1033			//IL_0572: Unknown result type (might be due to invalid IL or missing references)1034			//IL_073e: Unknown result type (might be due to invalid IL or missing references)1035			//IL_0743: Unknown result type (might be due to invalid IL or missing references)1036			//IL_074b: Unknown result type (might be due to invalid IL or missing references)1037			//IL_051c: Unknown result type (might be due to invalid IL or missing references)1038			//IL_0527: Unknown result type (might be due to invalid IL or missing references)1039			//IL_052c: Unknown result type (might be due to invalid IL or missing references)1040			//IL_0530: Unknown result type (might be due to invalid IL or missing references)1041			//IL_0535: Unknown result type (might be due to invalid IL or missing references)1042			//IL_030f: Unknown result type (might be due to invalid IL or missing references)1043			//IL_0314: Unknown result type (might be due to invalid IL or missing references)1044			//IL_0431: Unknown result type (might be due to invalid IL or missing references)1045			//IL_0440: Unknown result type (might be due to invalid IL or missing references)1046			//IL_0445: Unknown result type (might be due to invalid IL or missing references)1047			//IL_0449: Unknown result type (might be due to invalid IL or missing references)1048			//IL_044e: Unknown result type (might be due to invalid IL or missing references)1049			//IL_047e: Unknown result type (might be due to invalid IL or missing references)1050			//IL_0483: Unknown result type (might be due to invalid IL or missing references)1051			//IL_048b: Unknown result type (might be due to invalid IL or missing references)1052			//IL_0594: Unknown result type (might be due to invalid IL or missing references)1053			//IL_0599: Unknown result type (might be due to invalid IL or missing references)1054			//IL_054a: Unknown result type (might be due to invalid IL or missing references)1055			//IL_054c: Unknown result type (might be due to invalid IL or missing references)1056			//IL_0463: Unknown result type (might be due to invalid IL or missing references)1057			//IL_0465: Unknown result type (might be due to invalid IL or missing references)1058			//IL_0607: Unknown result type (might be due to invalid IL or missing references)1059			//IL_060c: Unknown result type (might be due to invalid IL or missing references)1060			//IL_0614: Unknown result type (might be due to invalid IL or missing references)1061			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)1062			//IL_06be: Unknown result type (might be due to invalid IL or missing references)1063			//IL_06c6: Unknown result type (might be due to invalid IL or missing references)1064			//IL_067b: Unknown result type (might be due to invalid IL or missing references)1065			//IL_0680: Unknown result type (might be due to invalid IL or missing references)1066			//IL_0684: Unknown result type (might be due to invalid IL or missing references)1067			//IL_0689: Unknown result type (might be due to invalid IL or missing references)1068			//IL_0333: Unknown result type (might be due to invalid IL or missing references)1069			//IL_0338: Unknown result type (might be due to invalid IL or missing references)1070			//IL_069e: Unknown result type (might be due to invalid IL or missing references)1071			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)1072			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)1073			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)1074			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)1075			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)1076			//IL_03cb: Unknown result type (might be due to invalid IL or missing references)1077			//IL_04de: Unknown result type (might be due to invalid IL or missing references)1078			//IL_05be: Unknown result type (might be due to invalid IL or missing references)1079			//IL_05c9: Unknown result type (might be due to invalid IL or missing references)1080			//IL_05ce: Unknown result type (might be due to invalid IL or missing references)1081			//IL_05d2: Unknown result type (might be due to invalid IL or missing references)1082			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)1083			//IL_06f4: Unknown result type (might be due to invalid IL or missing references)1084			//IL_06ff: Unknown result type (might be due to invalid IL or missing references)1085			//IL_0704: Unknown result type (might be due to invalid IL or missing references)1086			//IL_0708: Unknown result type (might be due to invalid IL or missing references)1087			//IL_070d: Unknown result type (might be due to invalid IL or missing references)1088			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)1089			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)1090			//IL_05ec: Unknown result type (might be due to invalid IL or missing references)1091			//IL_05ee: Unknown result type (might be due to invalid IL or missing references)1092			//IL_0658: Unknown result type (might be due to invalid IL or missing references)1093			//IL_0723: Unknown result type (might be due to invalid IL or missing references)1094			//IL_0725: Unknown result type (might be due to invalid IL or missing references)1095			int num = _003C_003E1__state;1096			ShoppingCartSubmit shoppingCartSubmit = _003C_003E4__this;1097			CartCheckResult result4;1098			try1099			{1100				ConfiguredTaskAwaiter<IEntity> val4;1101				ConfiguredTaskAwaiter<CartCheckResult> val3;1102				ConfiguredTaskAwaiter<IEntityCollection> val;1103				ConfiguredValueTaskAwaiter<ApplyResult> val2;1104				Query query;1105				IEntity result;1106				CartCheckResult result2;1107				IEntityCollection result3;1108				switch (num)1109				{1110				default:1111					val4 = shoppingCartSubmit.LoadShoppingCartOrderAsync(session, ct).ConfigureAwait(false).GetAwaiter();1112					if (!val4.IsCompleted)1113					{1114						num = (_003C_003E1__state = 0);1115						_003C_003Eu__1 = val4;1116						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CRunAsync_003Ed__14>(ref val4, ref this);1117						return;1118					}1119					goto IL_00a9;1120				case 0:1121					val4 = _003C_003Eu__1;1122					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);1123					num = (_003C_003E1__state = -1);1124					goto IL_00a9;1125				case 1:1126					val3 = _003C_003Eu__2;1127					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<CartCheckResult>);1128					num = (_003C_003E1__state = -1);1129					goto IL_012d;1130				case 2:1131					val2 = _003C_003Eu__3;1132					_003C_003Eu__3 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1133					num = (_003C_003E1__state = -1);1134					goto IL_01b9;1135				case 3:1136					val = _003C_003Eu__4;1137					_003C_003Eu__4 = default(ConfiguredTaskAwaiter<IEntityCollection>);1138					num = (_003C_003E1__state = -1);1139					goto IL_026e;1140				case 4:1141				case 5:1142					try1143					{1144						if (num != 4)1145						{1146							if (num != 5)1147							{1148								goto IL_04b0;1149							}1150							val2 = _003C_003Eu__3;1151							_003C_003Eu__3 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1152							num = (_003C_003E1__state = -1);1153							goto IL_049a;1154						}1155						val2 = _003C_003Eu__3;1156						_003C_003Eu__3 = default(ConfiguredValueTaskAwaiter<ApplyResult>);1157						num = (_003C_003E1__state = -1);1158						goto IL_0417;1159						IL_0417:1160						val2.GetResult();1161						val2 = _003Centity_003E5__7.PutValueAsync("CheckResultDetail", _003CcheckResultDetail_003E5__8, ct).ConfigureAwait(false).GetAwaiter();1162						if (!val2.IsCompleted)1163						{1164							num = (_003C_003E1__state = 5);1165							_003C_003Eu__3 = val2;1166							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003CRunAsync_003Ed__14>(ref val2, ref this);1167							return;1168						}1169						goto IL_049a;1170						IL_04b0:1171						if (_003C_003E7__wrap5.MoveNext())1172						{1173							KeyValuePair<string, IEntity> current = _003C_003E7__wrap5.Current;1174							_003Centity_003E5__7 = current.Value;1175							CartItemCheckResult valueOrDefault = CollectionExtensions.GetValueOrDefault<string, CartItemCheckResult>((IReadOnlyDictionary<string, CartItemCheckResult>)(object)_003CresultsByItem_003E5__5, current.Key);1176							int num2 = 0;1177							_003CcheckResultDetail_003E5__8 = null;1178							if (valueOrDefault != null)1179							{1180								num2 = (valueOrDefault.HasErrors ? 3 : ((!valueOrDefault.HasWarnings) ? 1 : 2));1181								_003CcheckResultDetail_003E5__8 = JsonSerializer.Serialize<CartItemCheckResult>(valueOrDefault, shoppingCartSubmit._jsonOptions);1182							}1183							val2 = _003Centity_003E5__7.PutValueAsync("CheckResult", num2, ct).ConfigureAwait(false).GetAwaiter();1184							if (!val2.IsCompleted)1185							{1186								num = (_003C_003E1__state = 4);1187								_003C_003Eu__3 = val2;1188								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003CRunAsync_003Ed__14>(ref val2, ref this);1189								return;1190							}1191							goto IL_0417;1192						}1193						goto end_IL_031a;1194						IL_049a:1195						val2.GetResult();1196						_003Centity_003E5__7 = null;1197						_003CcheckResultDetail_003E5__8 = null;1198						goto IL_04b0;1199						end_IL_031a:;1200					}1201					finally1202					{1203						if (num < 0)1204						{1205							((System.IDisposable)_003C_003E7__wrap5/*cast due to .constrained prefix*/).Dispose();1206						}1207					}1208					_003C_003E7__wrap5 = default(Enumerator<string, IEntity>);1209					_003Cu_003E5__9 = session.StartUnitOfWork();1210					break;1211				case 6:1212				case 7:1213				case 8:1214				case 9:1215					break;1216					IL_01b9:1217					val2.GetResult();1218					query = Query.From("ShoppingCartItem").SelectAll().Where(session.SqlFormatter().UidComparison("UID_ShoppingCartOrder", shoppingCartSubmit.Check.UidShoppingCartOrder));1219					val = session.Source().GetCollectionAsync(query, EntityCollectionLoadType.Bulk, ct).ConfigureAwait(false)1220						.GetAwaiter();1221					if (!val.IsCompleted)1222					{1223						num = (_003C_003E1__state = 3);1224						_003C_003Eu__4 = val;1225						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003CRunAsync_003Ed__14>(ref val, ref this);1226						return;1227					}1228					goto IL_026e;1229					IL_00a9:1230					result = val4.GetResult();1231					_003CscOrder_003E5__2 = result;1232					val3 = shoppingCartSubmit.CheckAsync(session, _003CscOrder_003E5__2, ct).ConfigureAwait(false).GetAwaiter();1233					if (!val3.IsCompleted)1234					{1235						num = (_003C_003E1__state = 1);1236						_003C_003Eu__2 = val3;1237						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<CartCheckResult>, _003CRunAsync_003Ed__14>(ref val3, ref this);1238						return;1239					}1240					goto IL_012d;1241					IL_012d:1242					result2 = val3.GetResult();1243					_003Cresult_003E5__3 = result2;1244					val2 = _003CscOrder_003E5__2.PutValueAsync("CheckStatus", 0, ct).ConfigureAwait(false).GetAwaiter();1245					if (!val2.IsCompleted)1246					{1247						num = (_003C_003E1__state = 2);1248						_003C_003Eu__3 = val2;1249						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003CRunAsync_003Ed__14>(ref val2, ref this);1250						return;1251					}1252					goto IL_01b9;1253					IL_026e:1254					result3 = val.GetResult();1255					_003Centities_003E5__4 = Enumerable.ToDictionary<IEntity, string>((System.Collections.Generic.IEnumerable<IEntity>)result3, (Func<IEntity, string>)((IEntity c) => c.GetValue("UID_ShoppingCartItem").String));1256					_003CresultsByItem_003E5__5 = Enumerable.ToDictionary<CartItemCheckResult, string>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)_003Cresult_003E5__3.Items, (Func<CartItemCheckResult, string>)((CartItemCheckResult g) => g.UidShoppingCartItem));1257					Logger.Debug("ShoppingCart PerformAsyncCheck: persisting results for {0} entities, hasWarnings: {1}, hasErrors: {2}", _003Centities_003E5__4.Count, _003Cresult_003E5__3.HasWarnings, _003Cresult_003E5__3.HasErrors);1258					_003C_003E7__wrap5 = _003Centities_003E5__4.GetEnumerator();1259					goto case 4;1260				}1261				try1262				{1263					ConfiguredTaskAwaitable val6;1264					ConfiguredTaskAwaiter val5;1265					switch (num)1266					{1267					default:1268						val6 = _003Cu_003E5__9.PutAsync(_003CscOrder_003E5__2, ct).ConfigureAwait(false);1269						val5 = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();1270						if (!((ConfiguredTaskAwaiter)(ref val5)).IsCompleted)1271						{1272							num = (_003C_003E1__state = 6);1273							_003C_003Eu__5 = val5;1274							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CRunAsync_003Ed__14>(ref val5, ref this);1275							return;1276						}1277						goto IL_0581;1278					case 6:1279						val5 = _003C_003Eu__5;1280						_003C_003Eu__5 = default(ConfiguredTaskAwaiter);1281						num = (_003C_003E1__state = -1);1282						goto IL_0581;1283					case 7:1284						try1285						{1286							if (num != 7)1287							{1288								goto IL_062a;1289							}1290							val5 = _003C_003Eu__5;1291							_003C_003Eu__5 = default(ConfiguredTaskAwaiter);1292							num = (_003C_003E1__state = -1);1293							goto IL_0623;1294							IL_0623:1295							((ConfiguredTaskAwaiter)(ref val5)).GetResult();1296							goto IL_062a;1297							IL_062a:1298							if (_003C_003E7__wrap9.MoveNext())1299							{1300								IEntity current2 = _003C_003E7__wrap9.Current;1301								val6 = _003Cu_003E5__9.PutAsync(current2, ct).ConfigureAwait(false);1302								val5 = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();1303								if (!((ConfiguredTaskAwaiter)(ref val5)).IsCompleted)1304								{1305									num = (_003C_003E1__state = 7);1306									_003C_003Eu__5 = val5;1307									_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CRunAsync_003Ed__14>(ref val5, ref this);1308									return;1309								}1310								goto IL_0623;1311							}1312						}1313						finally1314						{1315							if (num < 0)1316							{1317								((System.IDisposable)_003C_003E7__wrap9/*cast due to .constrained prefix*/).Dispose();1318							}1319						}1320						_003C_003E7__wrap9 = default(Enumerator<string, IEntity>);1321						goto case 8;1322					case 8:1323						try1324						{1325							if (num != 8)1326							{1327								val6 = additionalTask.Invoke(_003Cresult_003E5__3, _003Cu_003E5__9).ConfigureAwait(false);1328								val5 = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();1329								if (!((ConfiguredTaskAwaiter)(ref val5)).IsCompleted)1330								{1331									num = (_003C_003E1__state = 8);1332									_003C_003Eu__5 = val5;1333									_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CRunAsync_003Ed__14>(ref val5, ref this);1334									return;1335								}1336							}1337							else1338							{1339								val5 = _003C_003Eu__5;1340								_003C_003Eu__5 = default(ConfiguredTaskAwaiter);1341								num = (_003C_003E1__state = -1);1342							}1343							((ConfiguredTaskAwaiter)(ref val5)).GetResult();1344						}1345						catch (System.Exception ex)1346						{1347							throw new System.Exception("Exception while running additional submit actions", ex);1348						}1349						val6 = _003Cu_003E5__9.CommitAsync(ct).ConfigureAwait(false);1350						val5 = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();1351						if (!((ConfiguredTaskAwaiter)(ref val5)).IsCompleted)1352						{1353							num = (_003C_003E1__state = 9);1354							_003C_003Eu__5 = val5;1355							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CRunAsync_003Ed__14>(ref val5, ref this);1356							return;1357						}1358						break;1359					case 9:1360						{1361							val5 = _003C_003Eu__5;1362							_003C_003Eu__5 = default(ConfiguredTaskAwaiter);1363							num = (_003C_003E1__state = -1);1364							break;1365						}1366						IL_0581:1367						((ConfiguredTaskAwaiter)(ref val5)).GetResult();1368						_003C_003E7__wrap9 = _003Centities_003E5__4.Values.GetEnumerator();1369						goto case 7;1370					}1371					((ConfiguredTaskAwaiter)(ref val5)).GetResult();1372				}1373				finally1374				{1375					if (num < 0 && _003Cu_003E5__9 != null)1376					{1377						((System.IDisposable)_003Cu_003E5__9).Dispose();1378					}1379				}1380				_003Cu_003E5__9 = null;1381				result4 = _003Cresult_003E5__3;1382			}1383			catch (System.Exception exception)1384			{1385				_003C_003E1__state = -2;1386				_003CscOrder_003E5__2 = null;1387				_003Cresult_003E5__3 = null;1388				_003Centities_003E5__4 = null;1389				_003CresultsByItem_003E5__5 = null;1390				_003C_003Et__builder.SetException(exception);1391				return;1392			}1393			_003C_003E1__state = -2;1394			_003CscOrder_003E5__2 = null;1395			_003Cresult_003E5__3 = null;1396			_003Centities_003E5__4 = null;1397			_003CresultsByItem_003E5__5 = null;1398			_003C_003Et__builder.SetResult(result4);1399		}14001401		[DebuggerHidden]1402		private void SetStateMachine(IAsyncStateMachine stateMachine)1403		{1404			_003C_003Et__builder.SetStateMachine(stateMachine);1405		}1406	}14071408	[StructLayout((LayoutKind)3)]1409	[CompilerGenerated]1410	private struct _003CSubmitAsync_003Ed__11 : IAsyncStateMachine1411	{1412		public int _003C_003E1__state;14131414		public AsyncTaskMethodBuilder<CartCheckResult> _003C_003Et__builder;14151416		public ShoppingCartSubmit _003C_003E4__this;14171418		public bool ignoreWarnings;14191420		public ISession session;14211422		public CancellationToken ct;14231424		private ConfiguredTaskAwaiter<CartCheckResult> _003C_003Eu__1;14251426		private void MoveNext()1427		{1428			//IL_0079: Unknown result type (might be due to invalid IL or missing references)1429			//IL_007e: Unknown result type (might be due to invalid IL or missing references)1430			//IL_0085: Unknown result type (might be due to invalid IL or missing references)1431			//IL_0035: Unknown result type (might be due to invalid IL or missing references)1432			//IL_0040: Unknown result type (might be due to invalid IL or missing references)1433			//IL_0045: Unknown result type (might be due to invalid IL or missing references)1434			//IL_0049: Unknown result type (might be due to invalid IL or missing references)1435			//IL_004e: Unknown result type (might be due to invalid IL or missing references)1436			//IL_0062: Unknown result type (might be due to invalid IL or missing references)1437			//IL_0063: Unknown result type (might be due to invalid IL or missing references)1438			int num = _003C_003E1__state;1439			ShoppingCartSubmit shoppingCartSubmit = _003C_003E4__this;1440			CartCheckResult result;1441			try1442			{1443				ConfiguredTaskAwaiter<CartCheckResult> val;1444				if (num != 0)1445				{1446					shoppingCartSubmit.Check.Config.CheckMode = ((!ignoreWarnings) ? CheckMode.SubmitIfNoWarnings : CheckMode.SubmitWithWarnings);1447					val = shoppingCartSubmit.RunAsync(session, ct).ConfigureAwait(false).GetAwaiter();1448					if (!val.IsCompleted)1449					{1450						num = (_003C_003E1__state = 0);1451						_003C_003Eu__1 = val;1452						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<CartCheckResult>, _003CSubmitAsync_003Ed__11>(ref val, ref this);1453						return;1454					}1455				}1456				else1457				{1458					val = _003C_003Eu__1;1459					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<CartCheckResult>);1460					num = (_003C_003E1__state = -1);1461				}1462				result = val.GetResult();1463			}1464			catch (System.Exception exception)1465			{1466				_003C_003E1__state = -2;1467				_003C_003Et__builder.SetException(exception);1468				return;1469			}1470			_003C_003E1__state = -2;1471			_003C_003Et__builder.SetResult(result);1472		}14731474		[DebuggerHidden]1475		private void SetStateMachine(IAsyncStateMachine stateMachine)1476		{1477			_003C_003Et__builder.SetStateMachine(stateMachine);1478		}1479	}14801481	private static readonly Logger Logger = LogManager.GetLogger("WebLog");14821483	private readonly JsonSerializerOptions _jsonOptions;14841485	[field: CompilerGenerated]1486	public ShoppingCartCheck Check1487	{1488		[CompilerGenerated]1489		get;1490	}14911492	[field: CompilerGenerated]1493	public System.Collections.Generic.ICollection<ICartPostSubmitCheck> PostSubmitChecks1494	{1495		[CompilerGenerated]1496		get;1497	}14981499	public ShoppingCartSubmit(string uidShoppingCartOrder)1500		: this(uidShoppingCartOrder, new AccProductCache(LegacyMemoryCacheService.Instance), PluginConfiguration.Default, new ShopComponentType(PluginConfiguration.Default, LegacyMemoryCacheService.Instance.GetRegion("ShopComponentType")))1501	{1502	}15031504	public ShoppingCartSubmit(string uidShoppingCartOrder, IAccProductCache cache, IPluginService plugins, IComponentType<IShopComponent> shopComponentType)1505	{1506		Check = new ShoppingCartCheck(uidShoppingCartOrder, cache, plugins, shopComponentType);1507		PostSubmitChecks = (System.Collections.Generic.ICollection<ICartPostSubmitCheck>)Enumerable.ToList<ICartPostSubmitCheck>((System.Collections.Generic.IEnumerable<ICartPostSubmitCheck>)plugins.Get<ICartPostSubmitCheck>());1508		_jsonOptions = SerializerSettings.Default().WithMinDateHandling().WithInferredTypes()1509			.WithPlugins(plugins);1510	}15111512	[AsyncStateMachine(typeof(_003CCheckAsync_003Ed__10))]1513	[Obsolete]1514	public async System.Threading.Tasks.Task<CartCheckResult> CheckAsync(ISession session, CancellationToken ct = default(CancellationToken))1515	{1516		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1517		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1518		//IL_001e: Unknown result type (might be due to invalid IL or missing references)1519		//IL_001f: Unknown result type (might be due to invalid IL or missing references)1520		Check.Config.CheckMode = CheckMode.CheckOnly;1521		return await RunAsync(session, ct).ConfigureAwait(false);1522	}15231524	[AsyncStateMachine(typeof(_003CSubmitAsync_003Ed__11))]1525	[Obsolete]1526	public async System.Threading.Tasks.Task<CartCheckResult> SubmitAsync(ISession session, bool ignoreWarnings, CancellationToken ct = default(CancellationToken))1527	{1528		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1529		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1530		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1531		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1532		Check.Config.CheckMode = ((!ignoreWarnings) ? CheckMode.SubmitIfNoWarnings : CheckMode.SubmitWithWarnings);1533		return await RunAsync(session, ct).ConfigureAwait(false);1534	}15351536	[AsyncStateMachine(typeof(_003CLoadShoppingCartOrderAsync_003Ed__12))]1537	private async System.Threading.Tasks.Task<IEntity> LoadShoppingCartOrderAsync(ISession session, CancellationToken ct)1538	{1539		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1540		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1541		//IL_001e: Unknown result type (might be due to invalid IL or missing references)1542		//IL_001f: Unknown result type (might be due to invalid IL or missing references)1543		return await session.Source().GetAsync(new DbObjectKey("ShoppingCartOrder", Check.UidShoppingCartOrder), EntityLoadType.DelayedLogic, ct).ConfigureAwait(false);1544	}15451546	[AsyncStateMachine(typeof(_003CRunAsync_003Ed__13))]1547	public async System.Threading.Tasks.Task<CartCheckResult> RunAsync(ISession session, CancellationToken ct = default(CancellationToken))1548	{1549		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1550		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1551		//IL_001e: Unknown result type (might be due to invalid IL or missing references)1552		//IL_001f: Unknown result type (might be due to invalid IL or missing references)1553		return await RunAsync(session, (CartCheckResult _, IUnitOfWork __) => NullTask.Instance, ct).ConfigureAwait(false);1554	}15551556	[AsyncStateMachine(typeof(_003CRunAsync_003Ed__14))]1557	public async System.Threading.Tasks.Task<CartCheckResult> RunAsync(ISession session, Func<CartCheckResult, IUnitOfWork, System.Threading.Tasks.Task> additionalTask, CancellationToken ct = default(CancellationToken))1558	{1559		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1560		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1561		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1562		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1563		IEntity scOrder = await LoadShoppingCartOrderAsync(session, ct).ConfigureAwait(false);1564		CartCheckResult result = await CheckAsync(session, scOrder, ct).ConfigureAwait(false);1565		await scOrder.PutValueAsync("CheckStatus", 0, ct).ConfigureAwait(false);1566		Query query = Query.From("ShoppingCartItem").SelectAll().Where(session.SqlFormatter().UidComparison("UID_ShoppingCartOrder", Check.UidShoppingCartOrder));1567		Dictionary<string, IEntity> entities = Enumerable.ToDictionary<IEntity, string>((System.Collections.Generic.IEnumerable<IEntity>)(await session.Source().GetCollectionAsync(query, EntityCollectionLoadType.Bulk, ct).ConfigureAwait(false)), (Func<IEntity, string>)((IEntity c) => c.GetValue("UID_ShoppingCartItem").String));1568		Dictionary<string, CartItemCheckResult> resultsByItem = Enumerable.ToDictionary<CartItemCheckResult, string>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)result.Items, (Func<CartItemCheckResult, string>)((CartItemCheckResult g) => g.UidShoppingCartItem));1569		Logger.Debug("ShoppingCart PerformAsyncCheck: persisting results for {0} entities, hasWarnings: {1}, hasErrors: {2}", entities.Count, result.HasWarnings, result.HasErrors);1570		Enumerator<string, IEntity> enumerator = entities.GetEnumerator();1571		try1572		{1573			while (enumerator.MoveNext())1574			{1575				KeyValuePair<string, IEntity> current = enumerator.Current;1576				IEntity entity = current.Value;1577				CartItemCheckResult valueOrDefault = CollectionExtensions.GetValueOrDefault<string, CartItemCheckResult>((IReadOnlyDictionary<string, CartItemCheckResult>)(object)resultsByItem, current.Key);1578				int num = 0;1579				string checkResultDetail = null;1580				if (valueOrDefault != null)1581				{1582					num = (valueOrDefault.HasErrors ? 3 : ((!valueOrDefault.HasWarnings) ? 1 : 2));1583					checkResultDetail = JsonSerializer.Serialize<CartItemCheckResult>(valueOrDefault, _jsonOptions);1584				}1585				await entity.PutValueAsync("CheckResult", num, ct).ConfigureAwait(false);1586				await entity.PutValueAsync("CheckResultDetail", checkResultDetail, ct).ConfigureAwait(false);1587			}1588		}1589		finally1590		{1591			((System.IDisposable)enumerator/*cast due to .constrained prefix*/).Dispose();1592		}1593		using (IUnitOfWork u = session.StartUnitOfWork())1594		{1595			await u.PutAsync(scOrder, ct).ConfigureAwait(false);1596			Enumerator<string, IEntity> enumerator2 = entities.Values.GetEnumerator();1597			try1598			{1599				while (enumerator2.MoveNext())1600				{1601					IEntity current2 = enumerator2.Current;1602					await u.PutAsync(current2, ct).ConfigureAwait(false);1603				}1604			}1605			finally1606			{1607				((System.IDisposable)enumerator2/*cast due to .constrained prefix*/).Dispose();1608			}1609			try1610			{1611				await additionalTask.Invoke(result, u).ConfigureAwait(false);1612			}1613			catch (System.Exception ex)1614			{1615				throw new System.Exception("Exception while running additional submit actions", ex);1616			}1617			await u.CommitAsync(ct).ConfigureAwait(false);1618		}1619		return result;1620	}16211622	[AsyncStateMachine(typeof(_003CCheckAsync_003Ed__15))]1623	private async System.Threading.Tasks.Task<CartCheckResult> CheckAsync(ISession session, IEntity scOrder, CancellationToken ct = default(CancellationToken))1624	{1625		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1626		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1627		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1628		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1629		Cart cart = await Check.GetCartAsync(session, ct).ConfigureAwait(false);1630		CartCheckResult checkResult = await Check.CheckAsync(session, cart, ct).ConfigureAwait(false);1631		if (checkResult.HasErrors)1632		{1633			return checkResult;1634		}1635		CheckMode mode = Check.Config.CheckMode;1636		bool commit = mode != CheckMode.CheckOnly;1637		if (commit && !checkResult.CanCommitSilently)1638		{1639			Logger.Debug("Cannot commit silently. Not committing shopping cart.");1640			commit = false;1641		}1642		await session.BeginTransactionAsync(ct).ConfigureAwait(false);1643		bool committed = false;1644		object obj = null;1645		int num = 0;1646		CartCheckResult result = default(CartCheckResult);1647		try1648		{1649			string uidPerson = session.User().Uid;1650			if (string.IsNullOrEmpty(uidPerson))1651			{1652				uidPerson = scOrder.GetValue<string>("UID_Person");1653			}1654			CartItemData presubmit = new CartItemData(CartItemAction.PreSubmit, session);1655			System.Collections.Generic.IEnumerator<CartItem> enumerator = ((System.Collections.Generic.IEnumerable<CartItem>)cart.CartItems).GetEnumerator();1656			try1657			{1658				while (((System.Collections.IEnumerator)enumerator).MoveNext())1659				{1660					await enumerator.Current.OnNextAsync(presubmit, ct).ConfigureAwait(false);1661				}1662			}1663			finally1664			{1665				((System.IDisposable)enumerator)?.Dispose();1666			}1667			IEntity personObj = await session.Source().GetAsync(new DbObjectKey("Person", uidPerson), EntityLoadType.Interactive, ct).ConfigureAwait(false);1668			await session.StartTempQueueAsync(ct).ConfigureAwait(false);1669			OrderInfo orderInfo = (OrderInfo)(await personObj.CallFunctionAsync("OrderShoppingCart", Check.UidShoppingCartOrder, p2: true, ct).ConfigureAwait(false));1670			ItemInfo[] items = orderInfo.Items;1671			foreach (ItemInfo item in items)1672			{1673				CartItemCheckResult cartItemCheckResult = Enumerable.FirstOrDefault<CartItemCheckResult>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)checkResult.Items, (Func<CartItemCheckResult, bool>)((CartItemCheckResult cartItemCheckResult3) => cartItemCheckResult3.UidShoppingCartItem == item.UidShoppingCartItem));1674				if (cartItemCheckResult != null)1675				{1676					cartItemCheckResult.UidPersonWantsOrg = item.UidPersonWantsOrg;1677				}1678			}1679			if (!orderInfo.Succeeded)1680			{1681				System.Collections.Generic.IEnumerator<ItemInfo> enumerator2 = Enumerable.Where<ItemInfo>((System.Collections.Generic.IEnumerable<ItemInfo>)orderInfo.Items, (Func<ItemInfo, bool>)((ItemInfo itemInfo) => itemInfo.Error != null)).GetEnumerator();1682				try1683				{1684					while (((System.Collections.IEnumerator)enumerator2).MoveNext())1685					{1686						ItemInfo item2 = enumerator2.Current;1687						CartItemCheckResult cartItemCheckResult2 = Enumerable.FirstOrDefault<CartItemCheckResult>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)checkResult.Items, (Func<CartItemCheckResult, bool>)((CartItemCheckResult cartItemCheckResult3) => object.Equals((object)cartItemCheckResult3.UidShoppingCartItem, (object)item2.UidShoppingCartItem)));1688						SubmitException ex = new SubmitException(item2.Error);1689						if (cartItemCheckResult2 != null)1690						{1691							cartItemCheckResult2.Results = Enumerable.ToArray<ICartItemCheckResult>(cartItemCheckResult2.Results.AvoidNull().Concat(ex));1692							RequestableCheck requestableCheck = Enumerable.Single<RequestableCheck>(Enumerable.OfType<RequestableCheck>((System.Collections.IEnumerable)(object)cartItemCheckResult2.Checks));1693							if (ex.HasErrors)1694							{1695								requestableCheck.Detail.Exception = item2.Error;1696							}1697							else if (ex.HasWarnings)1698							{1699								requestableCheck.Detail.Warning = item2.Error;1700							}1701						}1702						else1703						{1704							Logger.Warn("No matching cart item (" + item2.UidShoppingCartItem + ") found for exception: " + item2.Error.Message);1705						}1706					}1707				}1708				finally1709				{1710					((System.IDisposable)enumerator2)?.Dispose();1711				}1712				System.Collections.Generic.IEnumerator<CartItemCheckResult> enumerator3 = Enumerable.Where<CartItemCheckResult>((System.Collections.Generic.IEnumerable<CartItemCheckResult>)checkResult.Items, (Func<CartItemCheckResult, bool>)((CartItemCheckResult o) => Enumerable.All<ItemInfo>((System.Collections.Generic.IEnumerable<ItemInfo>)orderInfo.Items, (Func<ItemInfo, bool>)((ItemInfo itemInfo) => itemInfo.UidShoppingCartItem != o.UidShoppingCartItem)))).GetEnumerator();1713				try1714				{1715					while (((System.Collections.IEnumerator)enumerator3).MoveNext())1716					{1717						CartItemCheckResult current = enumerator3.Current;1718						SubmitException ex2 = new SubmitException(ExceptionInfo.FromException((System.Exception?)(object)new ViException(6047003, ExceptionRelevance.EndUser)))1719						{1720							HasWarnings = true1721						};1722						current.Results = Enumerable.ToArray<ICartItemCheckResult>(current.Results.AvoidNull().Concat(ex2));1723						Enumerable.Single<RequestableCheck>(Enumerable.OfType<RequestableCheck>((System.Collections.IEnumerable)(object)current.Checks)).Detail.Warning = ex2.Exception;1724					}1725				}1726				finally1727				{1728					((System.IDisposable)enumerator3)?.Dispose();1729				}1730				result = checkResult;1731				num = 1;1732			}1733			else1734			{1735				using (IUnitOfWork u = session.StartUnitOfWork())1736				{1737					await u.PutAsync(personObj, ct).ConfigureAwait(false);1738					await u.CommitAsync(ct).ConfigureAwait(false);1739				}1740				System.Collections.Generic.IEnumerator<ICartPostSubmitCheck> enumerator4 = ((System.Collections.Generic.IEnumerable<ICartPostSubmitCheck>)PostSubmitChecks).GetEnumerator();1741				try1742				{1743					while (((System.Collections.IEnumerator)enumerator4).MoveNext())1744					{1745						await enumerator4.Current.CheckAsync(session, orderInfo, checkResult, ct).ConfigureAwait(false);1746					}1747				}1748				finally1749				{1750					((System.IDisposable)enumerator4)?.Dispose();1751				}1752				if (commit && !checkResult.HasErrors && (!checkResult.HasWarnings || mode == CheckMode.SubmitWithWarnings))1753				{1754					await session.CommitTransactionAsync(ct).ConfigureAwait(false);1755					committed = true;1756					checkResult.Submitted = true;1757				}1758			}1759		}1760		catch (object obj2)1761		{1762			obj = obj2;1763		}1764		if (!committed)1765		{1766			await session.RollbackTransactionAsync(CancellationToken.None).ConfigureAwait(false);1767		}1768		object obj3 = obj;1769		if (obj3 != null)1770		{1771			ExceptionDispatchInfo.Capture((obj3 as System.Exception) ?? throw obj3).Throw();1772		}1773		if (num == 1)1774		{1775			return result;1776		}1777		return checkResult;1778	}1779}1780