CPL.Customizer/CPL.Customizer/ESet.cs
Decompiler Source FileCPL.Customizer.ESetDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- Function registration: ComplianceCheckSimple at line 157
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
Summary: classes ESet; methods MoveNext, SetStateMachine, _ComplianceCheckSimple; references ESet; markers reads entity values, references DB/Dialog objects
Classes
ESetDB/Dialog object references
OIM key/entity markers
UID_ESetAPI/entity calls
GetValue SqlFormatterRegistrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections.Generic;3using System.Data;4using System.Data.Common;5using System.Diagnostics;6using System.Runtime.CompilerServices;7using System.Runtime.InteropServices;8using System.Threading;9using System.Threading.Tasks;10using VI.Base;11using VI.DB;12using VI.DB.DataAccess;13using VI.DB.Entities;1415namespace CPL.Customizer;1617public class ESet : StateBasedEntityLogic18{19 [StructLayout((LayoutKind)3)]20 [CompilerGenerated]21 private struct _003C_ComplianceCheckSimple_003Ed__1 : IAsyncStateMachine22 {23 public int _003C_003E1__state;2425 public AsyncTaskMethodBuilder<CCSESet[]> _003C_003Et__builder;2627 public ISession session;2829 public IEntity entity;3031 public CancellationToken ct;3233 private List<CCSESet> _003CcolCCS_003E5__2;3435 private DbDataReader _003CoDataReader_003E5__3;3637 private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__1;3839 private ConfiguredTaskAwaiter<bool> _003C_003Eu__2;4041 private void MoveNext()42 {43 //IL_00a8: Unknown result type (might be due to invalid IL or missing references)44 //IL_00ad: Unknown result type (might be due to invalid IL or missing references)45 //IL_00b5: Unknown result type (might be due to invalid IL or missing references)46 //IL_005f: Unknown result type (might be due to invalid IL or missing references)47 //IL_006a: Unknown result type (might be due to invalid IL or missing references)48 //IL_006f: Unknown result type (might be due to invalid IL or missing references)49 //IL_0073: Unknown result type (might be due to invalid IL or missing references)50 //IL_0078: Unknown result type (might be due to invalid IL or missing references)51 //IL_008d: Unknown result type (might be due to invalid IL or missing references)52 //IL_008f: Unknown result type (might be due to invalid IL or missing references)53 //IL_0142: Unknown result type (might be due to invalid IL or missing references)54 //IL_0147: Unknown result type (might be due to invalid IL or missing references)55 //IL_014f: Unknown result type (might be due to invalid IL or missing references)56 //IL_00f9: Unknown result type (might be due to invalid IL or missing references)57 //IL_0104: Unknown result type (might be due to invalid IL or missing references)58 //IL_0109: Unknown result type (might be due to invalid IL or missing references)59 //IL_010d: Unknown result type (might be due to invalid IL or missing references)60 //IL_0112: Unknown result type (might be due to invalid IL or missing references)61 //IL_0127: Unknown result type (might be due to invalid IL or missing references)62 //IL_0129: Unknown result type (might be due to invalid IL or missing references)63 int num = _003C_003E1__state;64 CCSESet[] result2;65 try66 {67 ConfiguredTaskAwaiter<DbDataReader> val;68 if (num != 0)69 {70 if (num == 1)71 {72 goto IL_00d6;73 }74 _003CcolCCS_003E5__2 = new List<CCSESet>();75 ISqlFormatter formatter = session.SqlFormatter();76 IDbSession dbSession = session.Resolve<IDbSession>();77 string sqlStatement = string.Format("select * from CPL_VCCSESetCheckDetail where {0}", (object)formatter.UidComparison("UID_ESet", entity.GetValue<string>("UID_ESet")));78 val = dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false).GetAwaiter();79 if (!val.IsCompleted)80 {81 num = (_003C_003E1__state = 0);82 _003C_003Eu__1 = val;83 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003C_ComplianceCheckSimple_003Ed__1>(ref val, ref this);84 return;85 }86 }87 else88 {89 val = _003C_003Eu__1;90 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbDataReader>);91 num = (_003C_003E1__state = -1);92 }93 DbDataReader result = val.GetResult();94 _003CoDataReader_003E5__3 = result;95 goto IL_00d6;96 IL_00d6:97 try98 {99 if (num != 1)100 {101 goto IL_00f2;102 }103 ConfiguredTaskAwaiter<bool> val2 = _003C_003Eu__2;104 _003C_003Eu__2 = default(ConfiguredTaskAwaiter<bool>);105 num = (_003C_003E1__state = -1);106 goto IL_015e;107 IL_015e:108 if (val2.GetResult())109 {110 _003CcolCCS_003E5__2.Add(new CCSESet((IDataReader)(object)_003CoDataReader_003E5__3));111 goto IL_00f2;112 }113 goto end_IL_00d6;114 IL_00f2:115 val2 = _003CoDataReader_003E5__3.ReadAsync(ct).ConfigureAwait(false).GetAwaiter();116 if (!val2.IsCompleted)117 {118 num = (_003C_003E1__state = 1);119 _003C_003Eu__2 = val2;120 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_ComplianceCheckSimple_003Ed__1>(ref val2, ref this);121 return;122 }123 goto IL_015e;124 end_IL_00d6:;125 }126 finally127 {128 if (num < 0 && _003CoDataReader_003E5__3 != null)129 {130 ((System.IDisposable)_003CoDataReader_003E5__3).Dispose();131 }132 }133 _003CoDataReader_003E5__3 = null;134 result2 = _003CcolCCS_003E5__2.ToArray();135 }136 catch (System.Exception exception)137 {138 _003C_003E1__state = -2;139 _003CcolCCS_003E5__2 = null;140 _003C_003Et__builder.SetException(exception);141 return;142 }143 _003C_003E1__state = -2;144 _003CcolCCS_003E5__2 = null;145 _003C_003Et__builder.SetResult(result2);146 }147148 [DebuggerHidden]149 private void SetStateMachine(IAsyncStateMachine stateMachine)150 {151 _003C_003Et__builder.SetStateMachine(stateMachine);152 }153 }154155 public ESet()156 {157 RegisterFunction("ComplianceCheckSimple").As<CCSESet[]>(_ComplianceCheckSimple).Enabled().From("[IsLoaded]", "Config(QER\\ComplianceCheck\\SimpleMode)")158 .As<bool, string>((Func<bool, string, bool>)((bool bLoaded, string strConfigParm) => bLoaded && strConfigParm == "1"))159 .Description("Method_ESet_ComplianceCheckSimple")160 .Behavior(MethodBehavior.ValidForReadOnlyUser);161 }162163 [AsyncStateMachine(typeof(_003C_ComplianceCheckSimple_003Ed__1))]164 private static async System.Threading.Tasks.Task<CCSESet[]> _ComplianceCheckSimple(ISession session, IEntity entity, CancellationToken ct)165 {166 //IL_0002: Unknown result type (might be due to invalid IL or missing references)167 //IL_0007: Unknown result type (might be due to invalid IL or missing references)168 //IL_001e: Unknown result type (might be due to invalid IL or missing references)169 //IL_001f: Unknown result type (might be due to invalid IL or missing references)170 List<CCSESet> colCCS = new List<CCSESet>();171 ISqlFormatter formatter = session.SqlFormatter();172 IDbSession dbSession = session.Resolve<IDbSession>();173 string sqlStatement = string.Format("select * from CPL_VCCSESetCheckDetail where {0}", (object)formatter.UidComparison("UID_ESet", entity.GetValue<string>("UID_ESet")));174 DbDataReader oDataReader = await dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false);175 try176 {177 while (await oDataReader.ReadAsync(ct).ConfigureAwait(false))178 {179 colCCS.Add(new CCSESet((IDataReader)(object)oDataReader));180 }181 }182 finally183 {184 ((System.IDisposable)oDataReader)?.Dispose();185 }186 return colCCS.ToArray();187 }188}189