QER.Customizer/QER.Customizer/ITShopProductCustomizer.cs
Decompiler Source FileQER.Customizer.ITShopProductCustomizerDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- Method registration: RemoveFromITShop at line 1366
- CallMethodAsync: Abort at line 885
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 ITShopProductCustomizer, _003C_003Ec__DisplayClass2_0, _003C_003Ec__DisplayClass4_0; methods MoveNext, SetStateMachine, _003C_Check_UidAccProduct_003Eb__0, _003C_Check_UidAccProduct_003Eb__1, _003CGetRelationTo_003Eb__1, HasReadonlyMemberships; references AccProduct, ITShopOrg, ITShopSrc, Person, PersonWantsOrg, QERAccProductUsage; markers reads entity values, references DB/Dialog objects, IT Shop related markers
Classes
ITShopProductCustomizer _003C_003Ec__DisplayClass2_0 _003C_003Ec__DisplayClass4_0Methods
DB/Dialog object references
OIM key/entity markers
UID_AccProduct UID_Org UID_ITShopOrg UID_ITShopSRCAPI/entity calls
GetValueAsync GetValue TryResult MetaData From Source SqlFormatter StartTempQueueAsync StartUnitOfWorkRegistrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Diagnostics;5using System.Linq;6using System.Runtime.CompilerServices;7using System.Runtime.InteropServices;8using System.Threading;9using System.Threading.Tasks;10using VI.Base;11using VI.DB;12using VI.DB.Entities;13using VI.DB.MetaData;1415namespace QER.Customizer;1617public class ITShopProductCustomizer : StateBasedEntityLogic18{19 [CompilerGenerated]20 private sealed class _003C_003Ec__DisplayClass2_021 {22 [StructLayout((LayoutKind)3)]23 private struct _003C_003C_Check_UidAccProduct_003Eb__1_003Ed : IAsyncStateMachine24 {25 public int _003C_003E1__state;2627 public AsyncTaskMethodBuilder<string> _003C_003Et__builder;2829 public IEntity e;3031 public _003C_003Ec__DisplayClass2_0 _003C_003E4__this;3233 private IEntity _003CeUsage_003E5__2;3435 private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__1;3637 private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__2;3839 private void MoveNext()40 {41 //IL_006f: Unknown result type (might be due to invalid IL or missing references)42 //IL_0074: Unknown result type (might be due to invalid IL or missing references)43 //IL_007c: Unknown result type (might be due to invalid IL or missing references)44 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)45 //IL_00be: Unknown result type (might be due to invalid IL or missing references)46 //IL_00c3: Unknown result type (might be due to invalid IL or missing references)47 //IL_00c7: Unknown result type (might be due to invalid IL or missing references)48 //IL_00cc: Unknown result type (might be due to invalid IL or missing references)49 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)50 //IL_0101: Unknown result type (might be due to invalid IL or missing references)51 //IL_0109: Unknown result type (might be due to invalid IL or missing references)52 //IL_0026: Unknown result type (might be due to invalid IL or missing references)53 //IL_0031: Unknown result type (might be due to invalid IL or missing references)54 //IL_0036: Unknown result type (might be due to invalid IL or missing references)55 //IL_003a: Unknown result type (might be due to invalid IL or missing references)56 //IL_003f: Unknown result type (might be due to invalid IL or missing references)57 //IL_00e1: Unknown result type (might be due to invalid IL or missing references)58 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)59 //IL_0054: Unknown result type (might be due to invalid IL or missing references)60 //IL_0056: Unknown result type (might be due to invalid IL or missing references)61 int num = _003C_003E1__state;62 _003C_003Ec__DisplayClass2_0 _003C_003Ec__DisplayClass2_ = _003C_003E4__this;63 string result3;64 try65 {66 ConfiguredTaskAwaiter<IMetaTable> val;67 ConfiguredTaskAwaiter<IEntity> val2;68 if (num != 0)69 {70 if (num == 1)71 {72 val = _003C_003Eu__2;73 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<IMetaTable>);74 num = (_003C_003E1__state = -1);75 goto IL_0118;76 }77 val2 = e.CreateAsync(_003C_003Ec__DisplayClass2_.session, EntityLoadType.ReadOnly, _003C_003Ec__DisplayClass2_.ct).ConfigureAwait(false).GetAwaiter();78 if (!val2.IsCompleted)79 {80 num = (_003C_003E1__state = 0);81 _003C_003Eu__1 = val2;82 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003C_003C_Check_UidAccProduct_003Eb__1_003Ed>(ref val2, ref this);83 return;84 }85 }86 else87 {88 val2 = _003C_003Eu__1;89 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntity>);90 num = (_003C_003E1__state = -1);91 }92 IEntity result = val2.GetResult();93 _003CeUsage_003E5__2 = result;94 val = _003C_003Ec__DisplayClass2_.session.MetaData().GetTableAsync(_003CeUsage_003E5__2.Tablename, _003C_003Ec__DisplayClass2_.ct).ConfigureAwait(false)95 .GetAwaiter();96 if (!val.IsCompleted)97 {98 num = (_003C_003E1__state = 1);99 _003C_003Eu__2 = val;100 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_003C_Check_UidAccProduct_003Eb__1_003Ed>(ref val, ref this);101 return;102 }103 goto IL_0118;104 IL_0118:105 IMetaTable result2 = val.GetResult();106 result3 = string.Concat(new string[6]107 {108 ((object)result2.DisplaySingular)?.ToString(),109 " (",110 result2.Tablename,111 ") - '",112 _003CeUsage_003E5__2.Display,113 "'"114 });115 }116 catch (System.Exception exception)117 {118 _003C_003E1__state = -2;119 _003CeUsage_003E5__2 = null;120 _003C_003Et__builder.SetException(exception);121 return;122 }123 _003C_003E1__state = -2;124 _003CeUsage_003E5__2 = null;125 _003C_003Et__builder.SetResult(result3);126 }127128 [DebuggerHidden]129 private void SetStateMachine(IAsyncStateMachine stateMachine)130 {131 _003C_003Et__builder.SetStateMachine(stateMachine);132 }133 }134135 public string uidAccProduct;136137 public ISession session;138139 public CancellationToken ct;140141 internal ExpressionClause _003C_Check_UidAccProduct_003Eb__0(IExpressionContext c)142 {143 return c.Column("UID_AccProduct") == uidAccProduct;144 }145146 [AsyncStateMachine(typeof(_003C_003C_Check_UidAccProduct_003Eb__1_003Ed))]147 internal async System.Threading.Tasks.Task<string> _003C_Check_UidAccProduct_003Eb__1(IEntity e)148 {149 //IL_0002: Unknown result type (might be due to invalid IL or missing references)150 //IL_0007: Unknown result type (might be due to invalid IL or missing references)151 IEntity eUsage = await e.CreateAsync(session, EntityLoadType.ReadOnly, ct).ConfigureAwait(false);152 IMetaTable metaTable = await session.MetaData().GetTableAsync(eUsage.Tablename, ct).ConfigureAwait(false);153 return string.Concat(new string[6]154 {155 ((object)metaTable.DisplaySingular)?.ToString(),156 " (",157 metaTable.Tablename,158 ") - '",159 eUsage.Display,160 "'"161 });162 }163 }164165 [CompilerGenerated]166 private sealed class _003C_003Ec__DisplayClass4_0167 {168 public string destTable;169170 internal bool _003CGetRelationTo_003Eb__1(IMetaTableRelation fk)171 {172 return string.Equals(fk.ParentTableName, destTable, (StringComparison)5);173 }174 }175176 [StructLayout((LayoutKind)3)]177 [CompilerGenerated]178 private struct _003CGetRelationTo_003Ed__4 : IAsyncStateMachine179 {180 public int _003C_003E1__state;181182 public AsyncTaskMethodBuilder<System.Collections.Generic.IEnumerable<IMetaTableRelation>> _003C_003Et__builder;183184 public string destTable;185186 public IMetaTable tabDef;187188 public CancellationToken ct;189190 private _003C_003Ec__DisplayClass4_0 _003C_003E8__1;191192 private ConfiguredTaskAwaiter<IMetaTableRelations> _003C_003Eu__1;193194 private ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTable>> _003C_003Eu__2;195196 private ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelations>> _003C_003Eu__3;197198 private void MoveNext()199 {200 //IL_0082: Unknown result type (might be due to invalid IL or missing references)201 //IL_0087: Unknown result type (might be due to invalid IL or missing references)202 //IL_008e: Unknown result type (might be due to invalid IL or missing references)203 //IL_0131: Unknown result type (might be due to invalid IL or missing references)204 //IL_0136: Unknown result type (might be due to invalid IL or missing references)205 //IL_013e: Unknown result type (might be due to invalid IL or missing references)206 //IL_01e1: Unknown result type (might be due to invalid IL or missing references)207 //IL_01e6: Unknown result type (might be due to invalid IL or missing references)208 //IL_01ee: Unknown result type (might be due to invalid IL or missing references)209 //IL_003c: Unknown result type (might be due to invalid IL or missing references)210 //IL_0047: Unknown result type (might be due to invalid IL or missing references)211 //IL_004c: Unknown result type (might be due to invalid IL or missing references)212 //IL_004f: Unknown result type (might be due to invalid IL or missing references)213 //IL_0054: Unknown result type (might be due to invalid IL or missing references)214 //IL_0068: Unknown result type (might be due to invalid IL or missing references)215 //IL_0069: Unknown result type (might be due to invalid IL or missing references)216 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)217 //IL_00f3: Unknown result type (might be due to invalid IL or missing references)218 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)219 //IL_00fc: Unknown result type (might be due to invalid IL or missing references)220 //IL_0101: Unknown result type (might be due to invalid IL or missing references)221 //IL_0198: Unknown result type (might be due to invalid IL or missing references)222 //IL_01a3: Unknown result type (might be due to invalid IL or missing references)223 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)224 //IL_01ac: Unknown result type (might be due to invalid IL or missing references)225 //IL_01b1: Unknown result type (might be due to invalid IL or missing references)226 //IL_0116: Unknown result type (might be due to invalid IL or missing references)227 //IL_0118: Unknown result type (might be due to invalid IL or missing references)228 //IL_01c6: Unknown result type (might be due to invalid IL or missing references)229 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)230 int num = _003C_003E1__state;231 System.Collections.Generic.IEnumerable<IMetaTableRelation> result;232 try233 {234 ConfiguredTaskAwaiter<IMetaTableRelations> val3;235 ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTable>> val2;236 ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelations>> val;237 switch (num)238 {239 default:240 _003C_003E8__1 = new _003C_003Ec__DisplayClass4_0();241 _003C_003E8__1.destTable = destTable;242 val3 = tabDef.GetChildRelationsAsync(ct).ConfigureAwait(false).GetAwaiter();243 if (!val3.IsCompleted)244 {245 num = (_003C_003E1__state = 0);246 _003C_003Eu__1 = val3;247 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTableRelations>, _003CGetRelationTo_003Ed__4>(ref val3, ref this);248 return;249 }250 goto IL_009d;251 case 0:252 val3 = _003C_003Eu__1;253 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IMetaTableRelations>);254 num = (_003C_003E1__state = -1);255 goto IL_009d;256 case 1:257 val2 = _003C_003Eu__2;258 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTable>>);259 num = (_003C_003E1__state = -1);260 goto IL_014d;261 case 2:262 {263 val = _003C_003Eu__3;264 _003C_003Eu__3 = default(ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelations>>);265 num = (_003C_003E1__state = -1);266 break;267 }268 IL_014d:269 val = Enumerable.Where<IMetaTable>(val2.GetResult(), (Func<IMetaTable, bool>)((IMetaTable t) => !t.IsDeactivated && t.Columns.IsAvailable("xorigin"))).SelectAsync<IMetaTable, IMetaTableRelations>([AsyncStateMachine(typeof(_003C_003Ec._003C_003CGetRelationTo_003Eb__4_5_003Ed))] async (IMetaTable t, CancellationToken cti) => await t.GetForeignKeysAsync(cti).ConfigureAwait(false), ct).ConfigureAwait(false)270 .GetAwaiter();271 if (!val.IsCompleted)272 {273 num = (_003C_003E1__state = 2);274 _003C_003Eu__3 = val;275 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelations>>, _003CGetRelationTo_003Ed__4>(ref val, ref this);276 return;277 }278 break;279 IL_009d:280 val2 = Enumerable.Where<IMetaTableRelation>((System.Collections.Generic.IEnumerable<IMetaTableRelation>)val3.GetResult(), (Func<IMetaTableRelation, bool>)((IMetaTableRelation cr) => cr.IsMemberRelation)).SelectAsync<IMetaTableRelation, IMetaTable>((IMetaTableRelation cr, CancellationToken cti) => cr.GetChildTableAsync(cti), ct).ConfigureAwait(false)281 .GetAwaiter();282 if (!val2.IsCompleted)283 {284 num = (_003C_003E1__state = 1);285 _003C_003Eu__2 = val2;286 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTable>>, _003CGetRelationTo_003Ed__4>(ref val2, ref this);287 return;288 }289 goto IL_014d;290 }291 result = Enumerable.Where<IMetaTableRelation>(Enumerable.SelectMany<IMetaTableRelations, IMetaTableRelation>(val.GetResult(), (Func<IMetaTableRelations, System.Collections.Generic.IEnumerable<IMetaTableRelation>>)((IMetaTableRelations r) => r)), (Func<IMetaTableRelation, bool>)((IMetaTableRelation fk) => string.Equals(fk.ParentTableName, _003C_003E8__1.destTable, (StringComparison)5)));292 }293 catch (System.Exception exception)294 {295 _003C_003E1__state = -2;296 _003C_003E8__1 = null;297 _003C_003Et__builder.SetException(exception);298 return;299 }300 _003C_003E1__state = -2;301 _003C_003E8__1 = null;302 _003C_003Et__builder.SetResult(result);303 }304305 [DebuggerHidden]306 private void SetStateMachine(IAsyncStateMachine stateMachine)307 {308 _003C_003Et__builder.SetStateMachine(stateMachine);309 }310 }311312 [StructLayout((LayoutKind)3)]313 [CompilerGenerated]314 private struct _003CHasReadonlyMemberships_003Ed__1 : IAsyncStateMachine315 {316 public int _003C_003E1__state;317318 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;319320 public IEntity entity;321322 public CancellationToken ct;323324 private ConfiguredValueTaskAwaiter<bool> _003C_003Eu__1;325326 private void MoveNext()327 {328 //IL_0092: Unknown result type (might be due to invalid IL or missing references)329 //IL_0097: Unknown result type (might be due to invalid IL or missing references)330 //IL_009e: Unknown result type (might be due to invalid IL or missing references)331 //IL_004b: Unknown result type (might be due to invalid IL or missing references)332 //IL_0059: Unknown result type (might be due to invalid IL or missing references)333 //IL_005e: Unknown result type (might be due to invalid IL or missing references)334 //IL_0062: Unknown result type (might be due to invalid IL or missing references)335 //IL_0067: Unknown result type (might be due to invalid IL or missing references)336 //IL_007b: Unknown result type (might be due to invalid IL or missing references)337 //IL_007c: Unknown result type (might be due to invalid IL or missing references)338 int num = _003C_003E1__state;339 bool result;340 try341 {342 ConfiguredValueTaskAwaiter<bool> val;343 if (num == 0)344 {345 val = _003C_003Eu__1;346 _003C_003Eu__1 = default(ConfiguredValueTaskAwaiter<bool>);347 num = (_003C_003E1__state = -1);348 goto IL_00ad;349 }350 if (!((System.Enum)entity.State).HasFlag((System.Enum)EntityState.LogicInitialize))351 {352 val = entity.Columns["HasReadOnlyMemberships"].GetValueAsync<bool>(ct).ConfigureAwait(false).GetAwaiter();353 if (!val.IsCompleted)354 {355 num = (_003C_003E1__state = 0);356 _003C_003Eu__1 = val;357 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<bool>, _003CHasReadonlyMemberships_003Ed__1>(ref val, ref this);358 return;359 }360 goto IL_00ad;361 }362 result = false;363 goto end_IL_0007;364 IL_00ad:365 result = val.GetResult();366 end_IL_0007:;367 }368 catch (System.Exception exception)369 {370 _003C_003E1__state = -2;371 _003C_003Et__builder.SetException(exception);372 return;373 }374 _003C_003E1__state = -2;375 _003C_003Et__builder.SetResult(result);376 }377378 [DebuggerHidden]379 private void SetStateMachine(IAsyncStateMachine stateMachine)380 {381 _003C_003Et__builder.SetStateMachine(stateMachine);382 }383 }384385 [StructLayout((LayoutKind)3)]386 [CompilerGenerated]387 private struct _003C_Check_UidAccProduct_003Ed__2 : IAsyncStateMachine388 {389 public int _003C_003E1__state;390391 public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;392393 public string uidAccProduct;394395 public ISession session;396397 public CancellationToken ct;398399 public IEntity entity;400401 private _003C_003Ec__DisplayClass2_0 _003C_003E8__1;402403 private ConfiguredValueTaskAwaiter<string> _003C_003Eu__1;404405 private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__2;406407 private void MoveNext()408 {409 //IL_00e3: Unknown result type (might be due to invalid IL or missing references)410 //IL_00e8: Unknown result type (might be due to invalid IL or missing references)411 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)412 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)413 //IL_01b0: Unknown result type (might be due to invalid IL or missing references)414 //IL_01b8: Unknown result type (might be due to invalid IL or missing references)415 //IL_0048: Unknown result type (might be due to invalid IL or missing references)416 //IL_004d: Unknown result type (might be due to invalid IL or missing references)417 //IL_0162: Unknown result type (might be due to invalid IL or missing references)418 //IL_016d: Unknown result type (might be due to invalid IL or missing references)419 //IL_0172: Unknown result type (might be due to invalid IL or missing references)420 //IL_0176: Unknown result type (might be due to invalid IL or missing references)421 //IL_017b: Unknown result type (might be due to invalid IL or missing references)422 //IL_0190: Unknown result type (might be due to invalid IL or missing references)423 //IL_0192: Unknown result type (might be due to invalid IL or missing references)424 //IL_0096: Unknown result type (might be due to invalid IL or missing references)425 //IL_00a5: Unknown result type (might be due to invalid IL or missing references)426 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)427 //IL_00ae: Unknown result type (might be due to invalid IL or missing references)428 //IL_00b3: Unknown result type (might be due to invalid IL or missing references)429 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)430 //IL_00ca: Unknown result type (might be due to invalid IL or missing references)431 int num = _003C_003E1__state;432 bool result;433 try434 {435 ConfiguredValueTaskAwaiter<string> val;436 if (num == 0)437 {438 val = _003C_003Eu__1;439 _003C_003Eu__1 = default(ConfiguredValueTaskAwaiter<string>);440 num = (_003C_003E1__state = -1);441 goto IL_00ff;442 }443 ConfiguredTaskAwaiter<IEntityCollection> val2;444 if (num == 1)445 {446 val2 = _003C_003Eu__2;447 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<IEntityCollection>);448 num = (_003C_003E1__state = -1);449 goto IL_01c7;450 }451 _003C_003E8__1 = new _003C_003Ec__DisplayClass2_0();452 _003C_003E8__1.uidAccProduct = uidAccProduct;453 _003C_003E8__1.session = session;454 _003C_003E8__1.ct = ct;455 if (!string.IsNullOrEmpty(_003C_003E8__1.uidAccProduct))456 {457 if (entity.IsLoaded)458 {459 val = entity.Columns["UID_AccProduct"].GetOldValueAsync<string>(_003C_003E8__1.ct).ConfigureAwait(false).GetAwaiter();460 if (!val.IsCompleted)461 {462 num = (_003C_003E1__state = 0);463 _003C_003Eu__1 = val;464 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<string>, _003C_Check_UidAccProduct_003Ed__2>(ref val, ref this);465 return;466 }467 goto IL_00ff;468 }469 goto IL_0120;470 }471 result = true;472 goto end_IL_0007;473 IL_01c7:474 IEntityCollection result2 = val2.GetResult();475 if (((System.Collections.Generic.IReadOnlyCollection<IEntity>)result2).Count > 0)476 {477 string text = string.Join(", ", Enumerable.Select<System.Threading.Tasks.Task<string>, string>(Enumerable.Select<IEntity, System.Threading.Tasks.Task<string>>((System.Collections.Generic.IEnumerable<IEntity>)result2, (Func<IEntity, System.Threading.Tasks.Task<string>>)([AsyncStateMachine(typeof(_003C_003Ec__DisplayClass2_0._003C_003C_Check_UidAccProduct_003Eb__1_003Ed))] async (IEntity e) =>478 {479 //IL_0002: Unknown result type (might be due to invalid IL or missing references)480 //IL_0007: Unknown result type (might be due to invalid IL or missing references)481 IEntity eUsage = await e.CreateAsync(_003C_003E8__1.session, EntityLoadType.ReadOnly, _003C_003E8__1.ct).ConfigureAwait(false);482 IMetaTable metaTable = await _003C_003E8__1.session.MetaData().GetTableAsync(eUsage.Tablename, _003C_003E8__1.ct).ConfigureAwait(false);483 return string.Concat(new string[6]484 {485 ((object)metaTable.DisplaySingular)?.ToString(),486 " (",487 metaTable.Tablename,488 ") - '",489 eUsage.Display,490 "'"491 });492 })), (Func<System.Threading.Tasks.Task<string>, string>)((System.Threading.Tasks.Task<string> t) => t.Result)));493 throw new ViException(2133434, ExceptionRelevance.EndUser, text);494 }495 result = true;496 goto end_IL_0007;497 IL_0120:498 Query query = (from c in Query.From("QERAccProductUsage")499 where c.Column("UID_AccProduct") == _003C_003E8__1.uidAccProduct500 select c).SelectDisplays();501 val2 = _003C_003E8__1.session.Source().GetCollectionAsync(query, EntityCollectionLoadType.LoadForeignDisplaysEvenWhenExpensive, _003C_003E8__1.ct).ConfigureAwait(false)502 .GetAwaiter();503 if (!val2.IsCompleted)504 {505 num = (_003C_003E1__state = 1);506 _003C_003Eu__2 = val2;507 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003C_Check_UidAccProduct_003Ed__2>(ref val2, ref this);508 return;509 }510 goto IL_01c7;511 IL_00ff:512 if (!string.Equals(val.GetResult(), _003C_003E8__1.uidAccProduct, (StringComparison)4))513 {514 goto IL_0120;515 }516 result = true;517 end_IL_0007:;518 }519 catch (System.Exception exception)520 {521 _003C_003E1__state = -2;522 _003C_003E8__1 = null;523 _003C_003Et__builder.SetException(exception);524 return;525 }526 _003C_003E1__state = -2;527 _003C_003E8__1 = null;528 _003C_003Et__builder.SetResult(result);529 }530531 [DebuggerHidden]532 private void SetStateMachine(IAsyncStateMachine stateMachine)533 {534 _003C_003Et__builder.SetStateMachine(stateMachine);535 }536 }537538 [StructLayout((LayoutKind)3)]539 [CompilerGenerated]540 private struct _003C_RemoveFromITShop_003Ed__3 : IAsyncStateMachine541 {542 public int _003C_003E1__state;543544 public AsyncTaskMethodBuilder _003C_003Et__builder;545546 public ISession session;547548 public CancellationToken ct;549550 public IEntity entity;551552 public ITShopProductCustomizer _003C_003E4__this;553554 private ISqlFormatter _003CfSql_003E5__2;555556 private AsyncTransaction _003CtDB_003E5__3;557558 private ConfiguredTaskAwaiter<AsyncTransaction> _003C_003Eu__1;559560 private IMetaTable _003CtabDef_003E5__4;561562 private string _003CstrObjectPk_003E5__5;563564 private string _003Cpk_003E5__6;565566 private ConfiguredTaskAwaiter _003C_003Eu__2;567568 private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__3;569570 private ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelation>> _003C_003Eu__4;571572 private System.Collections.Generic.IEnumerator<IMetaTableRelation> _003C_003E7__wrap6;573574 private IMetaTableRelation _003CtabRel_003E5__8;575576 private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__5;577578 private System.IDisposable _003C_003E7__wrap8;579580 private IUnitOfWork _003Cuow_003E5__10;581582 private System.Collections.Generic.IEnumerator<IEntity> _003C_003E7__wrap10;583584 private IEntity _003Ce_003E5__12;585586 private ConfiguredValueTaskAwaiter _003C_003Eu__6;587588 private void MoveNext()589 {590 //IL_007a: Unknown result type (might be due to invalid IL or missing references)591 //IL_007f: Unknown result type (might be due to invalid IL or missing references)592 //IL_0086: Unknown result type (might be due to invalid IL or missing references)593 //IL_0033: Unknown result type (might be due to invalid IL or missing references)594 //IL_003e: Unknown result type (might be due to invalid IL or missing references)595 //IL_0043: Unknown result type (might be due to invalid IL or missing references)596 //IL_0047: Unknown result type (might be due to invalid IL or missing references)597 //IL_004c: Unknown result type (might be due to invalid IL or missing references)598 //IL_0060: Unknown result type (might be due to invalid IL or missing references)599 //IL_0061: Unknown result type (might be due to invalid IL or missing references)600 //IL_0139: Unknown result type (might be due to invalid IL or missing references)601 //IL_013e: Unknown result type (might be due to invalid IL or missing references)602 //IL_0146: Unknown result type (might be due to invalid IL or missing references)603 //IL_01bc: Unknown result type (might be due to invalid IL or missing references)604 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)605 //IL_01c9: Unknown result type (might be due to invalid IL or missing references)606 //IL_0271: Unknown result type (might be due to invalid IL or missing references)607 //IL_0276: Unknown result type (might be due to invalid IL or missing references)608 //IL_027e: Unknown result type (might be due to invalid IL or missing references)609 //IL_0945: Unknown result type (might be due to invalid IL or missing references)610 //IL_094a: Unknown result type (might be due to invalid IL or missing references)611 //IL_0952: Unknown result type (might be due to invalid IL or missing references)612 //IL_0d0c: Unknown result type (might be due to invalid IL or missing references)613 //IL_0d11: Unknown result type (might be due to invalid IL or missing references)614 //IL_0d19: Unknown result type (might be due to invalid IL or missing references)615 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)616 //IL_00fb: Unknown result type (might be due to invalid IL or missing references)617 //IL_0100: Unknown result type (might be due to invalid IL or missing references)618 //IL_0104: Unknown result type (might be due to invalid IL or missing references)619 //IL_0109: Unknown result type (might be due to invalid IL or missing references)620 //IL_0173: Unknown result type (might be due to invalid IL or missing references)621 //IL_017e: Unknown result type (might be due to invalid IL or missing references)622 //IL_0183: Unknown result type (might be due to invalid IL or missing references)623 //IL_0187: Unknown result type (might be due to invalid IL or missing references)624 //IL_018c: Unknown result type (might be due to invalid IL or missing references)625 //IL_0228: Unknown result type (might be due to invalid IL or missing references)626 //IL_0233: Unknown result type (might be due to invalid IL or missing references)627 //IL_0238: Unknown result type (might be due to invalid IL or missing references)628 //IL_023c: Unknown result type (might be due to invalid IL or missing references)629 //IL_0241: Unknown result type (might be due to invalid IL or missing references)630 //IL_011e: Unknown result type (might be due to invalid IL or missing references)631 //IL_0120: Unknown result type (might be due to invalid IL or missing references)632 //IL_01a1: Unknown result type (might be due to invalid IL or missing references)633 //IL_01a3: Unknown result type (might be due to invalid IL or missing references)634 //IL_0256: Unknown result type (might be due to invalid IL or missing references)635 //IL_0258: Unknown result type (might be due to invalid IL or missing references)636 //IL_037b: Unknown result type (might be due to invalid IL or missing references)637 //IL_0380: Unknown result type (might be due to invalid IL or missing references)638 //IL_0388: Unknown result type (might be due to invalid IL or missing references)639 //IL_06c8: Unknown result type (might be due to invalid IL or missing references)640 //IL_06cd: Unknown result type (might be due to invalid IL or missing references)641 //IL_06d5: Unknown result type (might be due to invalid IL or missing references)642 //IL_0a9b: Unknown result type (might be due to invalid IL or missing references)643 //IL_0aa0: Unknown result type (might be due to invalid IL or missing references)644 //IL_0aa8: Unknown result type (might be due to invalid IL or missing references)645 //IL_067f: Unknown result type (might be due to invalid IL or missing references)646 //IL_068a: Unknown result type (might be due to invalid IL or missing references)647 //IL_068f: Unknown result type (might be due to invalid IL or missing references)648 //IL_0693: Unknown result type (might be due to invalid IL or missing references)649 //IL_0698: Unknown result type (might be due to invalid IL or missing references)650 //IL_0332: Unknown result type (might be due to invalid IL or missing references)651 //IL_033d: Unknown result type (might be due to invalid IL or missing references)652 //IL_0342: Unknown result type (might be due to invalid IL or missing references)653 //IL_0346: Unknown result type (might be due to invalid IL or missing references)654 //IL_034b: Unknown result type (might be due to invalid IL or missing references)655 //IL_06ad: Unknown result type (might be due to invalid IL or missing references)656 //IL_06af: Unknown result type (might be due to invalid IL or missing references)657 //IL_0360: Unknown result type (might be due to invalid IL or missing references)658 //IL_0362: Unknown result type (might be due to invalid IL or missing references)659 //IL_08fb: Unknown result type (might be due to invalid IL or missing references)660 //IL_0906: Unknown result type (might be due to invalid IL or missing references)661 //IL_090b: Unknown result type (might be due to invalid IL or missing references)662 //IL_090f: Unknown result type (might be due to invalid IL or missing references)663 //IL_0914: Unknown result type (might be due to invalid IL or missing references)664 //IL_0a51: Unknown result type (might be due to invalid IL or missing references)665 //IL_0a5c: Unknown result type (might be due to invalid IL or missing references)666 //IL_0a61: Unknown result type (might be due to invalid IL or missing references)667 //IL_0a65: Unknown result type (might be due to invalid IL or missing references)668 //IL_0a6a: Unknown result type (might be due to invalid IL or missing references)669 //IL_092a: Unknown result type (might be due to invalid IL or missing references)670 //IL_092c: Unknown result type (might be due to invalid IL or missing references)671 //IL_0a80: Unknown result type (might be due to invalid IL or missing references)672 //IL_0a82: Unknown result type (might be due to invalid IL or missing references)673 //IL_0cc2: Unknown result type (might be due to invalid IL or missing references)674 //IL_0ccd: Unknown result type (might be due to invalid IL or missing references)675 //IL_0cd2: Unknown result type (might be due to invalid IL or missing references)676 //IL_0cd6: Unknown result type (might be due to invalid IL or missing references)677 //IL_0cdb: Unknown result type (might be due to invalid IL or missing references)678 //IL_058c: Unknown result type (might be due to invalid IL or missing references)679 //IL_0591: Unknown result type (might be due to invalid IL or missing references)680 //IL_0599: Unknown result type (might be due to invalid IL or missing references)681 //IL_0852: Unknown result type (might be due to invalid IL or missing references)682 //IL_0857: Unknown result type (might be due to invalid IL or missing references)683 //IL_085f: Unknown result type (might be due to invalid IL or missing references)684 //IL_0cf1: Unknown result type (might be due to invalid IL or missing references)685 //IL_0cf3: Unknown result type (might be due to invalid IL or missing references)686 //IL_0468: Unknown result type (might be due to invalid IL or missing references)687 //IL_046d: Unknown result type (might be due to invalid IL or missing references)688 //IL_0475: Unknown result type (might be due to invalid IL or missing references)689 //IL_07ad: Unknown result type (might be due to invalid IL or missing references)690 //IL_07b2: Unknown result type (might be due to invalid IL or missing references)691 //IL_07ba: Unknown result type (might be due to invalid IL or missing references)692 //IL_0c25: Unknown result type (might be due to invalid IL or missing references)693 //IL_0c2a: Unknown result type (might be due to invalid IL or missing references)694 //IL_0c32: Unknown result type (might be due to invalid IL or missing references)695 //IL_0498: Unknown result type (might be due to invalid IL or missing references)696 //IL_04a3: Unknown result type (might be due to invalid IL or missing references)697 //IL_04a8: Unknown result type (might be due to invalid IL or missing references)698 //IL_04ac: Unknown result type (might be due to invalid IL or missing references)699 //IL_04b1: Unknown result type (might be due to invalid IL or missing references)700 //IL_04e1: Unknown result type (might be due to invalid IL or missing references)701 //IL_04e6: Unknown result type (might be due to invalid IL or missing references)702 //IL_04ee: Unknown result type (might be due to invalid IL or missing references)703 //IL_0b80: Unknown result type (might be due to invalid IL or missing references)704 //IL_0b85: Unknown result type (might be due to invalid IL or missing references)705 //IL_0b8d: Unknown result type (might be due to invalid IL or missing references)706 //IL_04c6: Unknown result type (might be due to invalid IL or missing references)707 //IL_04c8: Unknown result type (might be due to invalid IL or missing references)708 //IL_0763: Unknown result type (might be due to invalid IL or missing references)709 //IL_076e: Unknown result type (might be due to invalid IL or missing references)710 //IL_0773: Unknown result type (might be due to invalid IL or missing references)711 //IL_0777: Unknown result type (might be due to invalid IL or missing references)712 //IL_077c: Unknown result type (might be due to invalid IL or missing references)713 //IL_041b: Unknown result type (might be due to invalid IL or missing references)714 //IL_042a: Unknown result type (might be due to invalid IL or missing references)715 //IL_042f: Unknown result type (might be due to invalid IL or missing references)716 //IL_0433: Unknown result type (might be due to invalid IL or missing references)717 //IL_0438: Unknown result type (might be due to invalid IL or missing references)718 //IL_0792: Unknown result type (might be due to invalid IL or missing references)719 //IL_0794: Unknown result type (might be due to invalid IL or missing references)720 //IL_0808: Unknown result type (might be due to invalid IL or missing references)721 //IL_0813: Unknown result type (might be due to invalid IL or missing references)722 //IL_0818: Unknown result type (might be due to invalid IL or missing references)723 //IL_081c: Unknown result type (might be due to invalid IL or missing references)724 //IL_0821: Unknown result type (might be due to invalid IL or missing references)725 //IL_0b36: Unknown result type (might be due to invalid IL or missing references)726 //IL_0b41: Unknown result type (might be due to invalid IL or missing references)727 //IL_0b46: Unknown result type (might be due to invalid IL or missing references)728 //IL_0b4a: Unknown result type (might be due to invalid IL or missing references)729 //IL_0b4f: Unknown result type (might be due to invalid IL or missing references)730 //IL_044d: Unknown result type (might be due to invalid IL or missing references)731 //IL_044f: Unknown result type (might be due to invalid IL or missing references)732 //IL_0543: Unknown result type (might be due to invalid IL or missing references)733 //IL_054e: Unknown result type (might be due to invalid IL or missing references)734 //IL_0553: Unknown result type (might be due to invalid IL or missing references)735 //IL_0557: Unknown result type (might be due to invalid IL or missing references)736 //IL_055c: Unknown result type (might be due to invalid IL or missing references)737 //IL_0837: Unknown result type (might be due to invalid IL or missing references)738 //IL_0839: Unknown result type (might be due to invalid IL or missing references)739 //IL_0b65: Unknown result type (might be due to invalid IL or missing references)740 //IL_0b67: Unknown result type (might be due to invalid IL or missing references)741 //IL_0bdb: Unknown result type (might be due to invalid IL or missing references)742 //IL_0be6: Unknown result type (might be due to invalid IL or missing references)743 //IL_0beb: Unknown result type (might be due to invalid IL or missing references)744 //IL_0bef: Unknown result type (might be due to invalid IL or missing references)745 //IL_0bf4: Unknown result type (might be due to invalid IL or missing references)746 //IL_0571: Unknown result type (might be due to invalid IL or missing references)747 //IL_0573: Unknown result type (might be due to invalid IL or missing references)748 //IL_0c0a: Unknown result type (might be due to invalid IL or missing references)749 //IL_0c0c: Unknown result type (might be due to invalid IL or missing references)750 int num = _003C_003E1__state;751 ITShopProductCustomizer iTShopProductCustomizer = _003C_003E4__this;752 try753 {754 ConfiguredTaskAwaiter<AsyncTransaction> val;755 if (num != 0)756 {757 if ((uint)(num - 1) <= 14u)758 {759 goto IL_00a5;760 }761 _003CfSql_003E5__2 = session.SqlFormatter();762 val = AsyncTransaction.StartAsync(session, ct).ConfigureAwait(false).GetAwaiter();763 if (!val.IsCompleted)764 {765 num = (_003C_003E1__state = 0);766 _003C_003Eu__1 = val;767 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<AsyncTransaction>, _003C_RemoveFromITShop_003Ed__3>(ref val, ref this);768 return;769 }770 }771 else772 {773 val = _003C_003Eu__1;774 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<AsyncTransaction>);775 num = (_003C_003E1__state = -1);776 }777 AsyncTransaction result = val.GetResult();778 _003CtDB_003E5__3 = result;779 goto IL_00a5;780 IL_00a5:781 try782 {783 ConfiguredTaskAwaitable val5;784 ConfiguredTaskAwaiter val2;785 ConfiguredTaskAwaiter<IMetaTable> val4;786 ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelation>> val3;787 System.Collections.Generic.IEnumerable<IMetaTableRelation> result4;788 IMetaTable result5;789 System.Collections.Generic.IEnumerable<IMetaTableRelation> result7;790 switch (num)791 {792 default:793 val5 = session.StartTempQueueAsync(ct).ConfigureAwait(false);794 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();795 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)796 {797 num = (_003C_003E1__state = 1);798 _003C_003Eu__2 = val2;799 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);800 return;801 }802 goto IL_0155;803 case 1:804 val2 = _003C_003Eu__2;805 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);806 num = (_003C_003E1__state = -1);807 goto IL_0155;808 case 2:809 val4 = _003C_003Eu__3;810 _003C_003Eu__3 = default(ConfiguredTaskAwaiter<IMetaTable>);811 num = (_003C_003E1__state = -1);812 goto IL_01d8;813 case 3:814 val3 = _003C_003Eu__4;815 _003C_003Eu__4 = default(ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelation>>);816 num = (_003C_003E1__state = -1);817 goto IL_028d;818 case 4:819 case 5:820 case 6:821 case 7:822 case 8:823 case 9:824 case 10:825 try826 {827 IEntityCollection result2 = default(IEntityCollection);828 ConfiguredTaskAwaiter<IEntityCollection> val6;829 IEntityCollection result3 = default(IEntityCollection);830 Query query;831 switch (num)832 {833 case 4:834 val6 = _003C_003Eu__5;835 _003C_003Eu__5 = default(ConfiguredTaskAwaiter<IEntityCollection>);836 num = (_003C_003E1__state = -1);837 goto IL_0397;838 case 5:839 case 6:840 case 7:841 try842 {843 if ((uint)(num - 5) > 2u)844 {845 _003Cuow_003E5__10 = session.StartUnitOfWork();846 }847 try848 {849 if ((uint)(num - 5) > 1u)850 {851 if (num == 7)852 {853 val2 = _003C_003Eu__2;854 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);855 num = (_003C_003E1__state = -1);856 goto IL_05a8;857 }858 _003C_003E7__wrap10 = ((System.Collections.Generic.IEnumerable<IEntity>)result2).GetEnumerator();859 }860 try861 {862 if (num != 5)863 {864 if (num != 6)865 {866 goto IL_050b;867 }868 val2 = _003C_003Eu__2;869 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);870 num = (_003C_003E1__state = -1);871 goto IL_04fd;872 }873 ConfiguredValueTaskAwaiter val7 = _003C_003Eu__6;874 _003C_003Eu__6 = default(ConfiguredValueTaskAwaiter);875 num = (_003C_003E1__state = -1);876 goto IL_0484;877 IL_04fd:878 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();879 _003Ce_003E5__12 = null;880 goto IL_050b;881 IL_050b:882 if (((System.Collections.IEnumerator)_003C_003E7__wrap10).MoveNext())883 {884 _003Ce_003E5__12 = _003C_003E7__wrap10.Current;885 ConfiguredValueTaskAwaitable val8 = _003Ce_003E5__12.CallMethodAsync("Abort", ct).ConfigureAwait(false);886 val7 = ((ConfiguredValueTaskAwaitable)(ref val8)).GetAwaiter();887 if (!((ConfiguredValueTaskAwaiter)(ref val7)).IsCompleted)888 {889 num = (_003C_003E1__state = 5);890 _003C_003Eu__6 = val7;891 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val7, ref this);892 return;893 }894 goto IL_0484;895 }896 goto end_IL_03ee;897 IL_0484:898 ((ConfiguredValueTaskAwaiter)(ref val7)).GetResult();899 val5 = _003Cuow_003E5__10.PutAsync(_003Ce_003E5__12, ct).ConfigureAwait(false);900 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();901 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)902 {903 num = (_003C_003E1__state = 6);904 _003C_003Eu__2 = val2;905 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);906 return;907 }908 goto IL_04fd;909 end_IL_03ee:;910 }911 finally912 {913 if (num < 0 && _003C_003E7__wrap10 != null)914 {915 ((System.IDisposable)_003C_003E7__wrap10).Dispose();916 }917 }918 _003C_003E7__wrap10 = null;919 val5 = _003Cuow_003E5__10.CommitAsync(ct).ConfigureAwait(false);920 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();921 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)922 {923 num = (_003C_003E1__state = 7);924 _003C_003Eu__2 = val2;925 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);926 return;927 }928 goto IL_05a8;929 IL_05a8:930 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();931 }932 finally933 {934 if (num < 0 && _003Cuow_003E5__10 != null)935 {936 ((System.IDisposable)_003Cuow_003E5__10).Dispose();937 }938 }939 _003Cuow_003E5__10 = null;940 }941 finally942 {943 if (num < 0 && _003C_003E7__wrap8 != null)944 {945 _003C_003E7__wrap8.Dispose();946 }947 }948 _003C_003E7__wrap8 = null;949 goto IL_05f1;950 case 8:951 val6 = _003C_003Eu__5;952 _003C_003Eu__5 = default(ConfiguredTaskAwaiter<IEntityCollection>);953 num = (_003C_003E1__state = -1);954 goto IL_06e4;955 case 9:956 case 10:957 try958 {959 if ((uint)(num - 9) > 1u)960 {961 _003Cuow_003E5__10 = session.StartUnitOfWork();962 }963 try964 {965 if (num != 9)966 {967 if (num == 10)968 {969 val2 = _003C_003Eu__2;970 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);971 num = (_003C_003E1__state = -1);972 goto IL_086e;973 }974 _003C_003E7__wrap10 = ((System.Collections.Generic.IEnumerable<IEntity>)result3).GetEnumerator();975 }976 try977 {978 if (num != 9)979 {980 goto IL_07d0;981 }982 val2 = _003C_003Eu__2;983 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);984 num = (_003C_003E1__state = -1);985 goto IL_07c9;986 IL_07c9:987 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();988 goto IL_07d0;989 IL_07d0:990 if (((System.Collections.IEnumerator)_003C_003E7__wrap10).MoveNext())991 {992 IEntity current = _003C_003E7__wrap10.Current;993 current.MarkForDeletion();994 val5 = _003Cuow_003E5__10.PutAsync(current, ct).ConfigureAwait(false);995 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();996 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)997 {998 num = (_003C_003E1__state = 9);999 _003C_003Eu__2 = val2;1000 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);1001 return;1002 }1003 goto IL_07c9;1004 }1005 }1006 finally1007 {1008 if (num < 0 && _003C_003E7__wrap10 != null)1009 {1010 ((System.IDisposable)_003C_003E7__wrap10).Dispose();1011 }1012 }1013 _003C_003E7__wrap10 = null;1014 val5 = _003Cuow_003E5__10.CommitAsync(ct).ConfigureAwait(false);1015 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();1016 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)1017 {1018 num = (_003C_003E1__state = 10);1019 _003C_003Eu__2 = val2;1020 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);1021 return;1022 }1023 goto IL_086e;1024 IL_086e:1025 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();1026 }1027 finally1028 {1029 if (num < 0 && _003Cuow_003E5__10 != null)1030 {1031 ((System.IDisposable)_003Cuow_003E5__10).Dispose();1032 }1033 }1034 _003Cuow_003E5__10 = null;1035 }1036 finally1037 {1038 if (num < 0 && _003C_003E7__wrap8 != null)1039 {1040 _003C_003E7__wrap8.Dispose();1041 }1042 }1043 _003C_003E7__wrap8 = null;1044 goto IL_08b7;1045 default:1046 {1047 if (((System.Collections.IEnumerator)_003C_003E7__wrap6).MoveNext())1048 {1049 _003CtabRel_003E5__8 = _003C_003E7__wrap6.Current;1050 Query query2 = Query.From("PersonWantsOrg").Where($"OrderState in (select OrderState from QER_VPWOOrderState where IsClosed = 0)\r\nand UID_Org in (select UID_ITShopOrg from {_003CtabRel_003E5__8.ChildTableName} where {_003CfSql_003E5__2.Comparison(_003CstrObjectPk_003E5__5, _003Cpk_003E5__6, ValType.String, CompareOperator.Equal, FormatterOptions.None)}) ").SelectAll();1051 val6 = session.Source().GetCollectionAsync(query2, EntityCollectionLoadType.Bulk, ct).ConfigureAwait(false)1052 .GetAwaiter();1053 if (!val6.IsCompleted)1054 {1055 num = (_003C_003E1__state = 4);1056 _003C_003Eu__5 = val6;1057 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003C_RemoveFromITShop_003Ed__3>(ref val6, ref this);1058 return;1059 }1060 goto IL_0397;1061 }1062 break;1063 }1064 IL_0397:1065 result2 = val6.GetResult();1066 if (((System.Collections.Generic.IReadOnlyCollection<IEntity>)result2).Count > 0)1067 {1068 _003C_003E7__wrap8 = iTShopProductCustomizer.StartInternalProcess();1069 goto case 5;1070 }1071 goto IL_05f1;1072 IL_08b7:1073 _003CtabRel_003E5__8 = null;1074 goto default;1075 IL_05f1:1076 query = Query.From(_003CtabRel_003E5__8.ChildTableName).Where(_003CfSql_003E5__2.AndRelation(_003CfSql_003E5__2.Comparison(_003CstrObjectPk_003E5__5, entity.GetValue<string>(_003CstrObjectPk_003E5__5), ValType.String, CompareOperator.Equal, FormatterOptions.None), "UID_ITShopOrg in (select UID_ITShopOrg from ITShopOrg where " + _003CfSql_003E5__2.Comparison("ITShopInfo", "BO", ValType.String, CompareOperator.Equal, FormatterOptions.None) + ")")).SelectAll();1077 val6 = session.Source().GetCollectionAsync(query, EntityCollectionLoadType.Bulk, ct).ConfigureAwait(false)1078 .GetAwaiter();1079 if (!val6.IsCompleted)1080 {1081 num = (_003C_003E1__state = 8);1082 _003C_003Eu__5 = val6;1083 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003C_RemoveFromITShop_003Ed__3>(ref val6, ref this);1084 return;1085 }1086 goto IL_06e4;1087 IL_06e4:1088 result3 = val6.GetResult();1089 if (((System.Collections.Generic.IReadOnlyCollection<IEntity>)result3).Count > 0)1090 {1091 _003C_003E7__wrap8 = iTShopProductCustomizer.StartInternalProcess();1092 goto case 9;1093 }1094 goto IL_08b7;1095 }1096 }1097 finally1098 {1099 if (num < 0 && _003C_003E7__wrap6 != null)1100 {1101 ((System.IDisposable)_003C_003E7__wrap6).Dispose();1102 }1103 }1104 _003C_003E7__wrap6 = null;1105 val3 = GetRelationTo(_003CtabDef_003E5__4, "ITShopSrc", ct).ConfigureAwait(false).GetAwaiter();1106 if (!val3.IsCompleted)1107 {1108 num = (_003C_003E1__state = 11);1109 _003C_003Eu__4 = val3;1110 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelation>>, _003C_RemoveFromITShop_003Ed__3>(ref val3, ref this);1111 return;1112 }1113 goto IL_0961;1114 case 11:1115 val3 = _003C_003Eu__4;1116 _003C_003Eu__4 = default(ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelation>>);1117 num = (_003C_003E1__state = -1);1118 goto IL_0961;1119 case 12:1120 case 13:1121 case 14:1122 try1123 {1124 if (num != 12)1125 {1126 if ((uint)(num - 13) <= 1u)1127 {1128 goto IL_0ada;1129 }1130 goto IL_0c8a;1131 }1132 ConfiguredTaskAwaiter<IEntityCollection> val6 = _003C_003Eu__5;1133 _003C_003Eu__5 = default(ConfiguredTaskAwaiter<IEntityCollection>);1134 num = (_003C_003E1__state = -1);1135 goto IL_0ab7;1136 IL_0ab7:1137 IEntityCollection result6 = val6.GetResult();1138 if (((System.Collections.Generic.IReadOnlyCollection<IEntity>)result6).Count > 0)1139 {1140 _003C_003E7__wrap8 = iTShopProductCustomizer.StartInternalProcess();1141 goto IL_0ada;1142 }1143 goto IL_0c8a;1144 IL_0ada:1145 try1146 {1147 if ((uint)(num - 13) > 1u)1148 {1149 _003Cuow_003E5__10 = session.StartUnitOfWork();1150 }1151 try1152 {1153 if (num != 13)1154 {1155 if (num == 14)1156 {1157 val2 = _003C_003Eu__2;1158 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);1159 num = (_003C_003E1__state = -1);1160 goto IL_0c41;1161 }1162 _003C_003E7__wrap10 = ((System.Collections.Generic.IEnumerable<IEntity>)result6).GetEnumerator();1163 }1164 try1165 {1166 if (num != 13)1167 {1168 goto IL_0ba3;1169 }1170 val2 = _003C_003Eu__2;1171 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);1172 num = (_003C_003E1__state = -1);1173 goto IL_0b9c;1174 IL_0b9c:1175 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();1176 goto IL_0ba3;1177 IL_0ba3:1178 if (((System.Collections.IEnumerator)_003C_003E7__wrap10).MoveNext())1179 {1180 IEntity current2 = _003C_003E7__wrap10.Current;1181 current2.MarkForDeletion();1182 val5 = _003Cuow_003E5__10.PutAsync(current2, ct).ConfigureAwait(false);1183 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();1184 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)1185 {1186 num = (_003C_003E1__state = 13);1187 _003C_003Eu__2 = val2;1188 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);1189 return;1190 }1191 goto IL_0b9c;1192 }1193 }1194 finally1195 {1196 if (num < 0 && _003C_003E7__wrap10 != null)1197 {1198 ((System.IDisposable)_003C_003E7__wrap10).Dispose();1199 }1200 }1201 _003C_003E7__wrap10 = null;1202 val5 = _003Cuow_003E5__10.CommitAsync(ct).ConfigureAwait(false);1203 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();1204 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)1205 {1206 num = (_003C_003E1__state = 14);1207 _003C_003Eu__2 = val2;1208 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);1209 return;1210 }1211 goto IL_0c41;1212 IL_0c41:1213 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();1214 }1215 finally1216 {1217 if (num < 0 && _003Cuow_003E5__10 != null)1218 {1219 ((System.IDisposable)_003Cuow_003E5__10).Dispose();1220 }1221 }1222 _003Cuow_003E5__10 = null;1223 }1224 finally1225 {1226 if (num < 0 && _003C_003E7__wrap8 != null)1227 {1228 _003C_003E7__wrap8.Dispose();1229 }1230 }1231 _003C_003E7__wrap8 = null;1232 goto IL_0c8a;1233 IL_0c8a:1234 if (((System.Collections.IEnumerator)_003C_003E7__wrap6).MoveNext())1235 {1236 Query query3 = Query.From(_003C_003E7__wrap6.Current.ChildTableName).Where(_003CfSql_003E5__2.AndRelation(_003CfSql_003E5__2.Comparison(_003CstrObjectPk_003E5__5, entity.GetValue<string>(_003CstrObjectPk_003E5__5), ValType.String, CompareOperator.Equal, FormatterOptions.None), "UID_ITShopSRC in ( select UID_ITShopSRC from ITShopSRC where " + _003CfSql_003E5__2.OrRelation(_003CfSql_003E5__2.Comparison("ITShopInfo", "BG", ValType.String, CompareOperator.Equal, FormatterOptions.None), _003CfSql_003E5__2.Comparison("ITShopInfo", "BT", ValType.String, CompareOperator.Equal, FormatterOptions.None)) + ")")).SelectAll();1237 val6 = session.Source().GetCollectionAsync(query3, EntityCollectionLoadType.Bulk, ct).ConfigureAwait(false)1238 .GetAwaiter();1239 if (!val6.IsCompleted)1240 {1241 num = (_003C_003E1__state = 12);1242 _003C_003Eu__5 = val6;1243 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003C_RemoveFromITShop_003Ed__3>(ref val6, ref this);1244 return;1245 }1246 goto IL_0ab7;1247 }1248 }1249 finally1250 {1251 if (num < 0 && _003C_003E7__wrap6 != null)1252 {1253 ((System.IDisposable)_003C_003E7__wrap6).Dispose();1254 }1255 }1256 _003C_003E7__wrap6 = null;1257 val5 = _003CtDB_003E5__3.CommitAsync(ct).ConfigureAwait(false);1258 val2 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();1259 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)1260 {1261 num = (_003C_003E1__state = 15);1262 _003C_003Eu__2 = val2;1263 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_RemoveFromITShop_003Ed__3>(ref val2, ref this);1264 return;1265 }1266 break;1267 case 15:1268 {1269 val2 = _003C_003Eu__2;1270 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);1271 num = (_003C_003E1__state = -1);1272 break;1273 }1274 IL_0155:1275 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();1276 val4 = session.MetaData().GetTableAsync(entity.Tablename, ct).ConfigureAwait(false)1277 .GetAwaiter();1278 if (!val4.IsCompleted)1279 {1280 num = (_003C_003E1__state = 2);1281 _003C_003Eu__3 = val4;1282 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_RemoveFromITShop_003Ed__3>(ref val4, ref this);1283 return;1284 }1285 goto IL_01d8;1286 IL_0961:1287 result4 = val3.GetResult();1288 _003C_003E7__wrap6 = result4.GetEnumerator();1289 goto case 12;1290 IL_01d8:1291 result5 = val4.GetResult();1292 _003CtabDef_003E5__4 = result5;1293 _003CstrObjectPk_003E5__5 = _003CtabDef_003E5__4.PrimaryKeyColumns[0].Columnname;1294 _003Cpk_003E5__6 = entity.GetValue<string>(_003CstrObjectPk_003E5__5);1295 val3 = GetRelationTo(_003CtabDef_003E5__4, "ITShopOrg", ct).ConfigureAwait(false).GetAwaiter();1296 if (!val3.IsCompleted)1297 {1298 num = (_003C_003E1__state = 3);1299 _003C_003Eu__4 = val3;1300 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<IMetaTableRelation>>, _003C_RemoveFromITShop_003Ed__3>(ref val3, ref this);1301 return;1302 }1303 goto IL_028d;1304 IL_028d:1305 result7 = val3.GetResult();1306 _003C_003E7__wrap6 = result7.GetEnumerator();1307 goto case 4;1308 }1309 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();1310 _003CtabDef_003E5__4 = null;1311 _003CstrObjectPk_003E5__5 = null;1312 _003Cpk_003E5__6 = null;1313 }1314 finally1315 {1316 if (num < 0 && _003CtDB_003E5__3 != null)1317 {1318 ((System.IDisposable)_003CtDB_003E5__3).Dispose();1319 }1320 }1321 _003CtDB_003E5__3 = null;1322 }1323 catch (System.Exception exception)1324 {1325 _003C_003E1__state = -2;1326 _003CfSql_003E5__2 = null;1327 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1328 return;1329 }1330 _003C_003E1__state = -2;1331 _003CfSql_003E5__2 = null;1332 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1333 }13341335 [DebuggerHidden]1336 private void SetStateMachine(IAsyncStateMachine stateMachine)1337 {1338 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1339 }1340 }13411342 public ITShopProductCustomizer(EntityLogicConstructionParameters cParams)1343 {1344 if (cParams.Table.Columns.Contains("HasReadOnlyMemberships"))1345 {1346 RegisterExpensive("_IsReadOnly").DependsOn("HasReadOnlyMemberships").As<bool>((Func<ISession, IEntity, IEntityWalker, CancellationToken, System.Threading.Tasks.Task<bool>>)HasReadonlyMemberships);1347 }1348 else1349 {1350 RegisterExpensive("_IsReadOnly").As<bool>((Func<ISession, IEntity, IEntityWalker, CancellationToken, System.Threading.Tasks.Task<bool>>)((ISession s, IEntity e, IEntityWalker w, CancellationToken ct) => System.Threading.Tasks.Task.FromResult<bool>(false)));1351 }1352 if (cParams.Table.Columns.Contains("IsForITShop"))1353 {1354 CanEdit("IsForITShop").From("_IsReadOnly").As<bool>((Func<bool, bool>)((bool ro) => !ro)).ClearValueOnFalse();1355 if (cParams.Table.Columns.Contains("IsITShopOnly"))1356 {1357 CanEdit("IsITShopOnly").From("IsForITshop", "_IsReadOnly").As<bool, bool>((Func<bool, bool, bool>)((bool b, bool ro) => b && !ro)).ClearValueOnFalse();1358 Value("IsITShopOnly").From("IsForITshop").As<bool, TryResult<bool>>((bool b) => TryResult.FromResult(!b, value: false));1359 }1360 if (cParams.Table.Columns.Contains("UID_AccProduct"))1361 {1362 MinLen("UID_AccProduct").From("IsForITshop").As<bool>((Func<bool, int>)((bool b) => b ? 1 : 0));1363 Check("UID_AccProduct").AsExpensive<string>((Func<ISession, IEntity, IEntityWalker, string, CancellationToken, System.Threading.Tasks.Task<bool>>)_Check_UidAccProduct);1364 }1365 }1366 RegisterMethod("RemoveFromITShop").As(_RemoveFromITShop).Description("Method_RessourceBaseCustomizer_RemoveFromITShop").Visible()1367 .From("_IsReadOnly")1368 .As<bool>((Func<bool, bool>)((bool ro) => !ro))1369 .Enabled()1370 .From("_IsReadOnly")1371 .As<bool>((Func<bool, bool>)((bool ro) => !ro))1372 .Behavior(MethodBehavior.SingleObject | MethodBehavior.ChangesExternalState);1373 }13741375 [AsyncStateMachine(typeof(_003CHasReadonlyMemberships_003Ed__1))]1376 public static async System.Threading.Tasks.Task<bool> HasReadonlyMemberships(ISession session, IEntity entity, IEntityWalker walker, CancellationToken ct)1377 {1378 //IL_0002: Unknown result type (might be due to invalid IL or missing references)1379 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1380 //IL_0016: Unknown result type (might be due to invalid IL or missing references)1381 //IL_0017: Unknown result type (might be due to invalid IL or missing references)1382 if (((System.Enum)entity.State).HasFlag((System.Enum)EntityState.LogicInitialize))1383 {1384 return false;1385 }1386 return await entity.Columns["HasReadOnlyMemberships"].GetValueAsync<bool>(ct).ConfigureAwait(false);1387 }13881389 [AsyncStateMachine(typeof(_003C_Check_UidAccProduct_003Ed__2))]1390 private static async System.Threading.Tasks.Task<bool> _Check_UidAccProduct(ISession session, IEntity entity, IEntityWalker walker, string uidAccProduct, CancellationToken ct)1391 {1392 //IL_0002: Unknown result type (might be due to invalid IL or missing references)1393 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1394 //IL_0026: Unknown result type (might be due to invalid IL or missing references)1395 //IL_0028: Unknown result type (might be due to invalid IL or missing references)1396 if (string.IsNullOrEmpty(uidAccProduct))1397 {1398 return true;1399 }1400 if (entity.IsLoaded && string.Equals(await entity.Columns["UID_AccProduct"].GetOldValueAsync<string>(ct).ConfigureAwait(false), uidAccProduct, (StringComparison)4))1401 {1402 return true;1403 }1404 Query query = (from c in Query.From("QERAccProductUsage")1405 where c.Column("UID_AccProduct") == uidAccProduct1406 select c).SelectDisplays();1407 IEntityCollection entityCollection = await session.Source().GetCollectionAsync(query, EntityCollectionLoadType.LoadForeignDisplaysEvenWhenExpensive, ct).ConfigureAwait(false);1408 if (((System.Collections.Generic.IReadOnlyCollection<IEntity>)entityCollection).Count > 0)1409 {1410 string text = string.Join(", ", Enumerable.Select<System.Threading.Tasks.Task<string>, string>(Enumerable.Select<IEntity, System.Threading.Tasks.Task<string>>((System.Collections.Generic.IEnumerable<IEntity>)entityCollection, (Func<IEntity, System.Threading.Tasks.Task<string>>)([AsyncStateMachine(typeof(_003C_003Ec__DisplayClass2_0._003C_003C_Check_UidAccProduct_003Eb__1_003Ed))] async (IEntity e) =>1411 {1412 //IL_0002: Unknown result type (might be due to invalid IL or missing references)1413 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1414 IEntity eUsage = await e.CreateAsync(session, EntityLoadType.ReadOnly, ct).ConfigureAwait(false);1415 IMetaTable metaTable = await session.MetaData().GetTableAsync(eUsage.Tablename, ct).ConfigureAwait(false);1416 return string.Concat(new string[6]1417 {1418 ((object)metaTable.DisplaySingular)?.ToString(),1419 " (",1420 metaTable.Tablename,1421 ") - '",1422 eUsage.Display,1423 "'"1424 });1425 })), (Func<System.Threading.Tasks.Task<string>, string>)((System.Threading.Tasks.Task<string> t) => t.Result)));1426 throw new ViException(2133434, ExceptionRelevance.EndUser, text);1427 }1428 return true;1429 }14301431 [AsyncStateMachine(typeof(_003C_RemoveFromITShop_003Ed__3))]1432 private System.Threading.Tasks.Task _RemoveFromITShop(ISession session, IEntity entity, CancellationToken ct)1433 {1434 //IL_0002: Unknown result type (might be due to invalid IL or missing references)1435 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1436 //IL_0026: Unknown result type (might be due to invalid IL or missing references)1437 //IL_0027: Unknown result type (might be due to invalid IL or missing references)1438 _003C_RemoveFromITShop_003Ed__3 _003C_RemoveFromITShop_003Ed__ = default(_003C_RemoveFromITShop_003Ed__3);1439 _003C_RemoveFromITShop_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1440 _003C_RemoveFromITShop_003Ed__._003C_003E4__this = this;1441 _003C_RemoveFromITShop_003Ed__.session = session;1442 _003C_RemoveFromITShop_003Ed__.entity = entity;1443 _003C_RemoveFromITShop_003Ed__.ct = ct;1444 _003C_RemoveFromITShop_003Ed__._003C_003E1__state = -1;1445 ((AsyncTaskMethodBuilder)(ref _003C_RemoveFromITShop_003Ed__._003C_003Et__builder)).Start<_003C_RemoveFromITShop_003Ed__3>(ref _003C_RemoveFromITShop_003Ed__);1446 return ((AsyncTaskMethodBuilder)(ref _003C_RemoveFromITShop_003Ed__._003C_003Et__builder)).Task;1447 }14481449 [AsyncStateMachine(typeof(_003CGetRelationTo_003Ed__4))]1450 private static async System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IMetaTableRelation>> GetRelationTo(IMetaTable tabDef, string destTable, CancellationToken ct)1451 {1452 //IL_0002: Unknown result type (might be due to invalid IL or missing references)1453 //IL_0007: Unknown result type (might be due to invalid IL or missing references)1454 //IL_001e: Unknown result type (might be due to invalid IL or missing references)1455 //IL_001f: Unknown result type (might be due to invalid IL or missing references)1456 return Enumerable.Where<IMetaTableRelation>(Enumerable.SelectMany<IMetaTableRelations, IMetaTableRelation>(await Enumerable.Where<IMetaTable>(await Enumerable.Where<IMetaTableRelation>((System.Collections.Generic.IEnumerable<IMetaTableRelation>)(await tabDef.GetChildRelationsAsync(ct).ConfigureAwait(false)), (Func<IMetaTableRelation, bool>)((IMetaTableRelation cr) => cr.IsMemberRelation)).SelectAsync<IMetaTableRelation, IMetaTable>((IMetaTableRelation cr, CancellationToken cti) => cr.GetChildTableAsync(cti), ct).ConfigureAwait(false), (Func<IMetaTable, bool>)((IMetaTable t) => !t.IsDeactivated && t.Columns.IsAvailable("xorigin"))).SelectAsync<IMetaTable, IMetaTableRelations>([AsyncStateMachine(typeof(_003C_003Ec._003C_003CGetRelationTo_003Eb__4_5_003Ed))] async (IMetaTable t, CancellationToken cti) => await t.GetForeignKeysAsync(cti).ConfigureAwait(false), ct).ConfigureAwait(false), (Func<IMetaTableRelations, System.Collections.Generic.IEnumerable<IMetaTableRelation>>)((IMetaTableRelations r) => r)), (Func<IMetaTableRelation, bool>)((IMetaTableRelation fk) => string.Equals(fk.ParentTableName, destTable, (StringComparison)5)));1457 }1458}1459