TSB.Customizer/TSB.Customizer/MemberITShopOrderEntityLogic.cs
Decompiler Source FileTSB.Customizer.MemberITShopOrderEntityLogicDecompiled 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: CreateITShopOrder at line 188
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.
references DB/Dialog objects IT Shop related markers
Summary: classes MemberITShopOrderEntityLogic; methods MoveNext, SetStateMachine, CreateITShopOrder; references Person; markers references DB/Dialog objects, IT Shop related markers
Classes
MemberITShopOrderEntityLogicDB/Dialog object references
OIM key/entity markers
UID_PersonAPI/entity calls
MetaDataRegistrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Diagnostics;5using System.Runtime.CompilerServices;6using System.Runtime.InteropServices;7using System.Threading;8using System.Threading.Tasks;9using QER.Customizer;10using VI.Base;11using VI.DB.Entities;12using VI.DB.MetaData;13using VI.DB.Sync;1415namespace TSB.Customizer;1617public class MemberITShopOrderEntityLogic : StateBasedEntityLogic18{19 [StructLayout((LayoutKind)3)]20 [CompilerGenerated]21 private struct _003CCreateITShopOrder_003Ed__1 : IAsyncStateMachine22 {23 public int _003C_003E1__state;2425 public AsyncTaskMethodBuilder _003C_003Et__builder;2627 public ISession session;2829 public IEntity entity;3031 public CancellationToken ct;3233 public MemberITShopOrderEntityLogic _003C_003E4__this;3435 public string customScriptName;3637 private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__1;3839 private System.IDisposable _003C_003E7__wrap1;4041 private ConfiguredTaskAwaiter _003C_003Eu__2;4243 private void MoveNext()44 {45 //IL_0078: Unknown result type (might be due to invalid IL or missing references)46 //IL_007d: Unknown result type (might be due to invalid IL or missing references)47 //IL_0085: Unknown result type (might be due to invalid IL or missing references)48 //IL_002f: Unknown result type (might be due to invalid IL or missing references)49 //IL_003a: Unknown result type (might be due to invalid IL or missing references)50 //IL_003f: Unknown result type (might be due to invalid IL or missing references)51 //IL_0043: Unknown result type (might be due to invalid IL or missing references)52 //IL_0048: Unknown result type (might be due to invalid IL or missing references)53 //IL_005d: Unknown result type (might be due to invalid IL or missing references)54 //IL_005f: Unknown result type (might be due to invalid IL or missing references)55 //IL_01e6: Unknown result type (might be due to invalid IL or missing references)56 //IL_01eb: Unknown result type (might be due to invalid IL or missing references)57 //IL_01f3: Unknown result type (might be due to invalid IL or missing references)58 //IL_01a0: Unknown result type (might be due to invalid IL or missing references)59 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)60 //IL_01b0: Unknown result type (might be due to invalid IL or missing references)61 //IL_01b4: Unknown result type (might be due to invalid IL or missing references)62 //IL_01b9: Unknown result type (might be due to invalid IL or missing references)63 //IL_01ce: Unknown result type (might be due to invalid IL or missing references)64 //IL_01d0: Unknown result type (might be due to invalid IL or missing references)65 int num = _003C_003E1__state;66 MemberITShopOrderEntityLogic memberITShopOrderEntityLogic = _003C_003E4__this;67 try68 {69 ConfiguredTaskAwaiter<IMetaTable> val;70 if (num != 0)71 {72 if (num == 1)73 {74 goto IL_0178;75 }76 val = session.MetaData().GetTableAsync(entity.Tablename, ct).ConfigureAwait(false)77 .GetAwaiter();78 if (!val.IsCompleted)79 {80 num = (_003C_003E1__state = 0);81 _003C_003Eu__1 = val;82 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003CCreateITShopOrder_003Ed__1>(ref val, ref this);83 return;84 }85 }86 else87 {88 val = _003C_003Eu__1;89 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IMetaTable>);90 num = (_003C_003E1__state = -1);91 }92 IMetaColumns primaryKeyColumns = val.GetResult().PrimaryKeyColumns;93 if (((System.Collections.Generic.IReadOnlyCollection<IMetaColumn>)primaryKeyColumns).Count != 2)94 {95 throw new ViException(2133432, ExceptionRelevance.Technical);96 }97 string text = null;98 string text2 = null;99 System.Collections.Generic.IEnumerator<IMetaColumn> enumerator = ((System.Collections.Generic.IEnumerable<IMetaColumn>)primaryKeyColumns).GetEnumerator();100 try101 {102 while (((System.Collections.IEnumerator)enumerator).MoveNext())103 {104 IMetaColumn current = enumerator.Current;105 if (!current.IsFK)106 {107 throw new ViException(2133432, ExceptionRelevance.Technical);108 }109 IMetaTable parentTable = current.GetFKRelation().GetParentTable();110 if (parentTable.Columns.IsAvailable("IsForITShop"))111 {112 text2 = current.Columnname;113 continue;114 }115 if (parentTable.Columns.IsAvailable("UID_Person"))116 {117 text = current.Columnname;118 continue;119 }120 throw new ViException(2133432, ExceptionRelevance.Technical);121 }122 }123 finally124 {125 if (num < 0)126 {127 ((System.IDisposable)enumerator)?.Dispose();128 }129 }130 if (string.IsNullOrEmpty(text) || string.IsNullOrEmpty(text2))131 {132 throw new ViException(2133432, ExceptionRelevance.Technical);133 }134 _003C_003E7__wrap1 = memberITShopOrderEntityLogic.StartInternalProcess();135 goto IL_0178;136 IL_0178:137 try138 {139 ConfiguredTaskAwaiter val3;140 if (num != 1)141 {142 ConfiguredTaskAwaitable val2 = ITShopHelperAsync.CreateMemberITShopOrder(session, entity, text2, "FK(" + text + ").UID_Person", customScriptName, ct).ConfigureAwait(false);143 val3 = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();144 if (!((ConfiguredTaskAwaiter)(ref val3)).IsCompleted)145 {146 num = (_003C_003E1__state = 1);147 _003C_003Eu__2 = val3;148 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CCreateITShopOrder_003Ed__1>(ref val3, ref this);149 return;150 }151 }152 else153 {154 val3 = _003C_003Eu__2;155 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);156 num = (_003C_003E1__state = -1);157 }158 ((ConfiguredTaskAwaiter)(ref val3)).GetResult();159 }160 finally161 {162 if (num < 0 && _003C_003E7__wrap1 != null)163 {164 _003C_003E7__wrap1.Dispose();165 }166 }167 _003C_003E7__wrap1 = null;168 }169 catch (System.Exception exception)170 {171 _003C_003E1__state = -2;172 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);173 return;174 }175 _003C_003E1__state = -2;176 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();177 }178179 [DebuggerHidden]180 private void SetStateMachine(IAsyncStateMachine stateMachine)181 {182 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);183 }184 }185186 public MemberITShopOrderEntityLogic()187 {188 RegisterMethod("CreateITShopOrder").As<string>(CreateITShopOrder).Description("Method_Member_CreateITShopOrder").Enabled()189 .Default(value: false)190 .Enabled()191 .From("XOrigin")192 .As<int>((Func<int, bool>)((int xOrigin) => (xOrigin & 8) == 0))193 .Visible()194 .Default(value: false)195 .Visible()196 .From("XOrigin")197 .As<int>((Func<int, bool>)((int xOrigin) => (xOrigin & 8) == 0));198 }199200 [AsyncStateMachine(typeof(_003CCreateITShopOrder_003Ed__1))]201 private System.Threading.Tasks.Task CreateITShopOrder(ISession session, IEntity entity, string customScriptName, CancellationToken ct)202 {203 //IL_0002: Unknown result type (might be due to invalid IL or missing references)204 //IL_0007: Unknown result type (might be due to invalid IL or missing references)205 //IL_002e: Unknown result type (might be due to invalid IL or missing references)206 //IL_0030: Unknown result type (might be due to invalid IL or missing references)207 _003CCreateITShopOrder_003Ed__1 _003CCreateITShopOrder_003Ed__ = default(_003CCreateITShopOrder_003Ed__1);208 _003CCreateITShopOrder_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();209 _003CCreateITShopOrder_003Ed__._003C_003E4__this = this;210 _003CCreateITShopOrder_003Ed__.session = session;211 _003CCreateITShopOrder_003Ed__.entity = entity;212 _003CCreateITShopOrder_003Ed__.customScriptName = customScriptName;213 _003CCreateITShopOrder_003Ed__.ct = ct;214 _003CCreateITShopOrder_003Ed__._003C_003E1__state = -1;215 ((AsyncTaskMethodBuilder)(ref _003CCreateITShopOrder_003Ed__._003C_003Et__builder)).Start<_003CCreateITShopOrder_003Ed__1>(ref _003CCreateITShopOrder_003Ed__);216 return ((AsyncTaskMethodBuilder)(ref _003CCreateITShopOrder_003Ed__._003C_003Et__builder)).Task;217 }218}219