CPL.Customizer/CPL.Customizer/PersonWantsOrg.cs
Decompiler Source FileCPL.Customizer.PersonWantsOrgDecompiled 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 115
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 PersonWantsOrg; methods MoveNext, SetStateMachine, ComplianceCheckSimple; references Person, PersonWantsOrg; markers reads entity values, references DB/Dialog objects, IT Shop related markers
Classes
PersonWantsOrgDB/Dialog object references
OIM key/entity markers
UID_PersonWantsOrgAPI/entity calls
GetValue SqlFormatter DatabaseRegistrations / 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 PersonWantsOrg : StateBasedEntityLogic18{19 [StructLayout((LayoutKind)3)]20 [CompilerGenerated]21 private struct _003CComplianceCheckSimple_003Ed__1 : IAsyncStateMachine22 {23 public int _003C_003E1__state;2425 public AsyncTaskMethodBuilder<CCSPwO[]> _003C_003Et__builder;2627 public ISession session;2829 public IEntity entity;3031 public CancellationToken ct;3233 private List<CCSPwO> _003CcolCCS_003E5__2;3435 private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__1;3637 private void MoveNext()38 {39 //IL_00b4: Unknown result type (might be due to invalid IL or missing references)40 //IL_00b9: Unknown result type (might be due to invalid IL or missing references)41 //IL_00c1: Unknown result type (might be due to invalid IL or missing references)42 //IL_006b: Unknown result type (might be due to invalid IL or missing references)43 //IL_0076: Unknown result type (might be due to invalid IL or missing references)44 //IL_007b: Unknown result type (might be due to invalid IL or missing references)45 //IL_007f: Unknown result type (might be due to invalid IL or missing references)46 //IL_0084: Unknown result type (might be due to invalid IL or missing references)47 //IL_0099: Unknown result type (might be due to invalid IL or missing references)48 //IL_009b: Unknown result type (might be due to invalid IL or missing references)49 int num = _003C_003E1__state;50 CCSPwO[] result2;51 try52 {53 ConfiguredTaskAwaiter<DbDataReader> val;54 if (num != 0)55 {56 _003CcolCCS_003E5__2 = new List<CCSPwO>();57 IDbSession dbSession = session.Resolve<IDbSession>();58 ISqlFormatter formatter = session.SqlFormatter();59 string systemIdentifier = session.Database().SystemIdentifier;60 object obj = formatter.FormatUidValue(entity.GetValue<string>("UID_PersonWantsOrg"));61 string sqlStatement = SqlStrings.Format(systemIdentifier, "PwO_ComplianceCheckSimple", new System.ReadOnlySpan<object>(ref obj));62 val = dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false).GetAwaiter();63 if (!val.IsCompleted)64 {65 num = (_003C_003E1__state = 0);66 _003C_003Eu__1 = val;67 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003CComplianceCheckSimple_003Ed__1>(ref val, ref this);68 return;69 }70 }71 else72 {73 val = _003C_003Eu__1;74 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbDataReader>);75 num = (_003C_003E1__state = -1);76 }77 IDataReader result = (IDataReader)(object)val.GetResult();78 try79 {80 while (result.Read())81 {82 _003CcolCCS_003E5__2.Add(new CCSPwO(result));83 }84 }85 finally86 {87 if (num < 0)88 {89 ((System.IDisposable)result)?.Dispose();90 }91 }92 result2 = _003CcolCCS_003E5__2.ToArray();93 }94 catch (System.Exception exception)95 {96 _003C_003E1__state = -2;97 _003CcolCCS_003E5__2 = null;98 _003C_003Et__builder.SetException(exception);99 return;100 }101 _003C_003E1__state = -2;102 _003CcolCCS_003E5__2 = null;103 _003C_003Et__builder.SetResult(result2);104 }105106 [DebuggerHidden]107 private void SetStateMachine(IAsyncStateMachine stateMachine)108 {109 _003C_003Et__builder.SetStateMachine(stateMachine);110 }111 }112113 public PersonWantsOrg()114 {115 RegisterFunction("ComplianceCheckSimple").As<CCSPwO[]>(ComplianceCheckSimple).Enabled().From("[IsLoaded]", "Config(QER\\ComplianceCheck\\SimpleMode)")116 .As<bool, string>((Func<bool, string, bool>)((bool bLoaded, string strConfigParm) => bLoaded && strConfigParm == "1"))117 .Description("Method_PersonWantsOrg_ComplianceCheckSimple")118 .Behavior(MethodBehavior.ValidForReadOnlyUser);119 }120121 [AsyncStateMachine(typeof(_003CComplianceCheckSimple_003Ed__1))]122 public static async System.Threading.Tasks.Task<CCSPwO[]> ComplianceCheckSimple(ISession session, IEntity entity, CancellationToken ct)123 {124 //IL_0002: Unknown result type (might be due to invalid IL or missing references)125 //IL_0007: Unknown result type (might be due to invalid IL or missing references)126 //IL_001e: Unknown result type (might be due to invalid IL or missing references)127 //IL_001f: Unknown result type (might be due to invalid IL or missing references)128 List<CCSPwO> colCCS = new List<CCSPwO>();129 IDbSession dbSession = session.Resolve<IDbSession>();130 ISqlFormatter formatter = session.SqlFormatter();131 string systemIdentifier = session.Database().SystemIdentifier;132 object obj = formatter.FormatUidValue(entity.GetValue<string>("UID_PersonWantsOrg"));133 string sqlStatement = SqlStrings.Format(systemIdentifier, "PwO_ComplianceCheckSimple", new System.ReadOnlySpan<object>(ref obj));134 IDataReader val = (IDataReader)(object)(await dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false));135 try136 {137 while (val.Read())138 {139 colCCS.Add(new CCSPwO(val));140 }141 }142 finally143 {144 ((System.IDisposable)val)?.Dispose();145 }146 return colCCS.ToArray();147 }148}149