DPR.Customizer/DPR.Customizer/DPRNamespace.cs
Decompiler Source FileDPR.Customizer.DPRNamespaceDecompiled 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: BulkDeleteOutstanding at line 178
- Method registration: BulkDeleteOutstandingState at line 195
- Method registration: BulkPublishOutstanding at line 212
Typed Edges
- No typed edges extracted for this source.
References
- No direct source references extracted.
Referenced By
- No direct source references extracted.
Complete Source
1using System;2using System.Diagnostics;3using System.Runtime.CompilerServices;4using System.Runtime.InteropServices;5using System.Threading;6using System.Threading.Tasks;7using VI.DB;8using VI.DB.Entities;9using VI.Projector.Database.Outstanding;1011namespace DPR.Customizer;1213public class DPRNamespace : StateLessEntityLogic14{15 private enum OutstandingAction16 {17 Delete,18 DeleteState,19 Publish20 }2122 [StructLayout((LayoutKind)3)]23 [CompilerGenerated]24 private struct _003C_HandleOutstanding_003Ed__2 : IAsyncStateMachine25 {26 public int _003C_003E1__state;2728 public AsyncTaskMethodBuilder _003C_003Et__builder;2930 public ISession session;3132 public IEntity entity;3334 public OutstandingAction action;3536 public string tableName;3738 public string whereClause;3940 public CancellationToken ct;4142 private ConfiguredTaskAwaiter _003C_003Eu__1;4344 private void MoveNext()45 {46 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)47 //IL_00be: Unknown result type (might be due to invalid IL or missing references)48 //IL_00c5: Unknown result type (might be due to invalid IL or missing references)49 //IL_0135: Unknown result type (might be due to invalid IL or missing references)50 //IL_013a: Unknown result type (might be due to invalid IL or missing references)51 //IL_0141: Unknown result type (might be due to invalid IL or missing references)52 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)53 //IL_01b0: Unknown result type (might be due to invalid IL or missing references)54 //IL_01b7: Unknown result type (might be due to invalid IL or missing references)55 //IL_0072: Unknown result type (might be due to invalid IL or missing references)56 //IL_007d: Unknown result type (might be due to invalid IL or missing references)57 //IL_0082: Unknown result type (might be due to invalid IL or missing references)58 //IL_0086: Unknown result type (might be due to invalid IL or missing references)59 //IL_008b: Unknown result type (might be due to invalid IL or missing references)60 //IL_00ee: Unknown result type (might be due to invalid IL or missing references)61 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)62 //IL_00fe: Unknown result type (might be due to invalid IL or missing references)63 //IL_0102: Unknown result type (might be due to invalid IL or missing references)64 //IL_0107: Unknown result type (might be due to invalid IL or missing references)65 //IL_0167: Unknown result type (might be due to invalid IL or missing references)66 //IL_0172: Unknown result type (might be due to invalid IL or missing references)67 //IL_0177: Unknown result type (might be due to invalid IL or missing references)68 //IL_017b: Unknown result type (might be due to invalid IL or missing references)69 //IL_0180: Unknown result type (might be due to invalid IL or missing references)70 //IL_009f: Unknown result type (might be due to invalid IL or missing references)71 //IL_00a0: Unknown result type (might be due to invalid IL or missing references)72 //IL_011b: Unknown result type (might be due to invalid IL or missing references)73 //IL_011c: Unknown result type (might be due to invalid IL or missing references)74 //IL_0194: Unknown result type (might be due to invalid IL or missing references)75 //IL_0195: Unknown result type (might be due to invalid IL or missing references)76 int num = _003C_003E1__state;77 try78 {79 OutstandingManager outstandingManager;80 ConfiguredTaskAwaiter val;81 ConfiguredTaskAwaitable val2;82 switch (num)83 {84 default:85 outstandingManager = new OutstandingManager(session, entity.Columns["Ident_DPRNameSpace"].GetValue<string>())86 {87 UseBulkProcessing = true88 };89 switch (action)90 {91 case OutstandingAction.Delete:92 goto IL_0064;93 case OutstandingAction.DeleteState:94 goto IL_00e0;95 case OutstandingAction.Publish:96 goto IL_0159;97 }98 goto end_IL_0007;99 case 0:100 val = _003C_003Eu__1;101 _003C_003Eu__1 = default(ConfiguredTaskAwaiter);102 num = (_003C_003E1__state = -1);103 goto IL_00d4;104 case 1:105 val = _003C_003Eu__1;106 _003C_003Eu__1 = default(ConfiguredTaskAwaiter);107 num = (_003C_003E1__state = -1);108 goto IL_0150;109 case 2:110 {111 val = _003C_003Eu__1;112 _003C_003Eu__1 = default(ConfiguredTaskAwaiter);113 num = (_003C_003E1__state = -1);114 break;115 }116 IL_0159:117 val2 = outstandingManager.PublishAsync(tableName, whereClause, ct).ConfigureAwait(false);118 val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();119 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)120 {121 num = (_003C_003E1__state = 2);122 _003C_003Eu__1 = val;123 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_HandleOutstanding_003Ed__2>(ref val, ref this);124 return;125 }126 break;127 IL_0064:128 val2 = outstandingManager.DeleteAsync(tableName, whereClause, ct).ConfigureAwait(false);129 val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();130 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)131 {132 num = (_003C_003E1__state = 0);133 _003C_003Eu__1 = val;134 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_HandleOutstanding_003Ed__2>(ref val, ref this);135 return;136 }137 goto IL_00d4;138 IL_00e0:139 val2 = outstandingManager.DeleteStateAsync(tableName, whereClause, ct).ConfigureAwait(false);140 val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();141 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)142 {143 num = (_003C_003E1__state = 1);144 _003C_003Eu__1 = val;145 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_HandleOutstanding_003Ed__2>(ref val, ref this);146 return;147 }148 goto IL_0150;149 IL_00d4:150 ((ConfiguredTaskAwaiter)(ref val)).GetResult();151 goto end_IL_0007;152 IL_0150:153 ((ConfiguredTaskAwaiter)(ref val)).GetResult();154 goto end_IL_0007;155 }156 ((ConfiguredTaskAwaiter)(ref val)).GetResult();157 end_IL_0007:;158 }159 catch (System.Exception exception)160 {161 _003C_003E1__state = -2;162 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);163 return;164 }165 _003C_003E1__state = -2;166 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();167 }168169 [DebuggerHidden]170 private void SetStateMachine(IAsyncStateMachine stateMachine)171 {172 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);173 }174 }175176 public DPRNamespace()177 {178 RegisterMethod("BulkDeleteOutstanding").As<string, string>([AsyncStateMachine(typeof(_003C_003Ec._003C_003C_002Dctor_003Eb__1_0_003Ed))] (ISession s, IEntity e, string tableName, string whereClause, CancellationToken ct) =>179 {180 //IL_0002: Unknown result type (might be due to invalid IL or missing references)181 //IL_0007: Unknown result type (might be due to invalid IL or missing references)182 //IL_002f: Unknown result type (might be due to invalid IL or missing references)183 //IL_0031: Unknown result type (might be due to invalid IL or missing references)184 _003C_003Ec._003C_003C_002Dctor_003Eb__1_0_003Ed _003C_003C_002Dctor_003Eb__1_0_003Ed = default(_003C_003Ec._003C_003C_002Dctor_003Eb__1_0_003Ed);185 _003C_003C_002Dctor_003Eb__1_0_003Ed._003C_003Et__builder = AsyncTaskMethodBuilder.Create();186 _003C_003C_002Dctor_003Eb__1_0_003Ed.s = s;187 _003C_003C_002Dctor_003Eb__1_0_003Ed.e = e;188 _003C_003C_002Dctor_003Eb__1_0_003Ed.tableName = tableName;189 _003C_003C_002Dctor_003Eb__1_0_003Ed.whereClause = whereClause;190 _003C_003C_002Dctor_003Eb__1_0_003Ed.ct = ct;191 _003C_003C_002Dctor_003Eb__1_0_003Ed._003C_003E1__state = -1;192 ((AsyncTaskMethodBuilder)(ref _003C_003C_002Dctor_003Eb__1_0_003Ed._003C_003Et__builder)).Start<_003C_003Ec._003C_003C_002Dctor_003Eb__1_0_003Ed>(ref _003C_003C_002Dctor_003Eb__1_0_003Ed);193 return ((AsyncTaskMethodBuilder)(ref _003C_003C_002Dctor_003Eb__1_0_003Ed._003C_003Et__builder)).Task;194 }).Description("Method_DPRNamespace_BulkDeleteOutstanding").IsDisplayMethod("str2224_BulkDeleteOutstanding");195 RegisterMethod("BulkDeleteOutstandingState").As<string, string>([AsyncStateMachine(typeof(_003C_003Ec._003C_003C_002Dctor_003Eb__1_1_003Ed))] (ISession s, IEntity e, string tableName, string whereClause, CancellationToken ct) =>196 {197 //IL_0002: Unknown result type (might be due to invalid IL or missing references)198 //IL_0007: Unknown result type (might be due to invalid IL or missing references)199 //IL_002f: Unknown result type (might be due to invalid IL or missing references)200 //IL_0031: Unknown result type (might be due to invalid IL or missing references)201 _003C_003Ec._003C_003C_002Dctor_003Eb__1_1_003Ed _003C_003C_002Dctor_003Eb__1_1_003Ed = default(_003C_003Ec._003C_003C_002Dctor_003Eb__1_1_003Ed);202 _003C_003C_002Dctor_003Eb__1_1_003Ed._003C_003Et__builder = AsyncTaskMethodBuilder.Create();203 _003C_003C_002Dctor_003Eb__1_1_003Ed.s = s;204 _003C_003C_002Dctor_003Eb__1_1_003Ed.e = e;205 _003C_003C_002Dctor_003Eb__1_1_003Ed.tableName = tableName;206 _003C_003C_002Dctor_003Eb__1_1_003Ed.whereClause = whereClause;207 _003C_003C_002Dctor_003Eb__1_1_003Ed.ct = ct;208 _003C_003C_002Dctor_003Eb__1_1_003Ed._003C_003E1__state = -1;209 ((AsyncTaskMethodBuilder)(ref _003C_003C_002Dctor_003Eb__1_1_003Ed._003C_003Et__builder)).Start<_003C_003Ec._003C_003C_002Dctor_003Eb__1_1_003Ed>(ref _003C_003C_002Dctor_003Eb__1_1_003Ed);210 return ((AsyncTaskMethodBuilder)(ref _003C_003C_002Dctor_003Eb__1_1_003Ed._003C_003Et__builder)).Task;211 }).Description("Method_DPRNamespace_BulkDeleteOutstandingState").IsDisplayMethod("str2224_BulkDeleteOutstandingState");212 RegisterMethod("BulkPublishOutstanding").As<string, string>([AsyncStateMachine(typeof(_003C_003Ec._003C_003C_002Dctor_003Eb__1_2_003Ed))] (ISession s, IEntity e, string tableName, string whereClause, CancellationToken ct) =>213 {214 //IL_0002: Unknown result type (might be due to invalid IL or missing references)215 //IL_0007: Unknown result type (might be due to invalid IL or missing references)216 //IL_002f: Unknown result type (might be due to invalid IL or missing references)217 //IL_0031: Unknown result type (might be due to invalid IL or missing references)218 _003C_003Ec._003C_003C_002Dctor_003Eb__1_2_003Ed _003C_003C_002Dctor_003Eb__1_2_003Ed = default(_003C_003Ec._003C_003C_002Dctor_003Eb__1_2_003Ed);219 _003C_003C_002Dctor_003Eb__1_2_003Ed._003C_003Et__builder = AsyncTaskMethodBuilder.Create();220 _003C_003C_002Dctor_003Eb__1_2_003Ed.s = s;221 _003C_003C_002Dctor_003Eb__1_2_003Ed.e = e;222 _003C_003C_002Dctor_003Eb__1_2_003Ed.tableName = tableName;223 _003C_003C_002Dctor_003Eb__1_2_003Ed.whereClause = whereClause;224 _003C_003C_002Dctor_003Eb__1_2_003Ed.ct = ct;225 _003C_003C_002Dctor_003Eb__1_2_003Ed._003C_003E1__state = -1;226 ((AsyncTaskMethodBuilder)(ref _003C_003C_002Dctor_003Eb__1_2_003Ed._003C_003Et__builder)).Start<_003C_003Ec._003C_003C_002Dctor_003Eb__1_2_003Ed>(ref _003C_003C_002Dctor_003Eb__1_2_003Ed);227 return ((AsyncTaskMethodBuilder)(ref _003C_003C_002Dctor_003Eb__1_2_003Ed._003C_003Et__builder)).Task;228 }).Description("Method_DPRNamespace_BulkPublishOutstanding").IsDisplayMethod("str2224_BulkPublishOutstanding");229 }230231 [AsyncStateMachine(typeof(_003C_HandleOutstanding_003Ed__2))]232 private static System.Threading.Tasks.Task _HandleOutstanding(ISession session, IEntity entity, string tableName, string whereClause, OutstandingAction action, CancellationToken ct)233 {234 //IL_0002: Unknown result type (might be due to invalid IL or missing references)235 //IL_0007: Unknown result type (might be due to invalid IL or missing references)236 //IL_0037: Unknown result type (might be due to invalid IL or missing references)237 //IL_0039: Unknown result type (might be due to invalid IL or missing references)238 _003C_HandleOutstanding_003Ed__2 _003C_HandleOutstanding_003Ed__ = default(_003C_HandleOutstanding_003Ed__2);239 _003C_HandleOutstanding_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();240 _003C_HandleOutstanding_003Ed__.session = session;241 _003C_HandleOutstanding_003Ed__.entity = entity;242 _003C_HandleOutstanding_003Ed__.tableName = tableName;243 _003C_HandleOutstanding_003Ed__.whereClause = whereClause;244 _003C_HandleOutstanding_003Ed__.action = action;245 _003C_HandleOutstanding_003Ed__.ct = ct;246 _003C_HandleOutstanding_003Ed__._003C_003E1__state = -1;247 ((AsyncTaskMethodBuilder)(ref _003C_HandleOutstanding_003Ed__._003C_003Et__builder)).Start<_003C_HandleOutstanding_003Ed__2>(ref _003C_HandleOutstanding_003Ed__);248 return ((AsyncTaskMethodBuilder)(ref _003C_HandleOutstanding_003Ed__._003C_003Et__builder)).Task;249 }250}251