Back to OIM Explorer

QER.Customizer/QER.Customizer/OrgBaseEntityLogic.cs

Decompiler Source FileQER.Customizer.OrgBaseEntityLogicDecompiled Source

1 extracted method/event/call references in OrgBaseEntityLogic.

Source: F:\Claude\.tmp\oim-decompiled-full\0991_One_Identity_Manager_QER.Customizer.dll\QER.Customizer\OrgBaseEntityLogic.cs

Source size: 15.560 characters

Interpretation

  • Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.

Relations

  • Function registration: CanAssign at line 300

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 OrgBaseEntityLogic; methods MoveNext, SetStateMachine, ValidParentCheck, _CanAssign; references BasetreeAssign, DialogTable, OrgRoot, OrgRootAssign; markers reads entity values, references DB/Dialog objects

Classes

OrgBaseEntityLogic

OIM key/entity markers

UID_OrgRoot UID_BaseTreeAssign UID_DialogTableElement UID_DialogTable

API/entity calls

GetValue ExistsAsync SqlFormatter Source GetValue

Registrations / handlers

None extracted.

Complete Source

C#342 lines
1using System;2using System.Diagnostics;3using System.Runtime.CompilerServices;4using System.Runtime.InteropServices;5using System.Threading;6using System.Threading.Tasks;7using VI.Base;8using VI.DB;9using VI.DB.Entities;1011namespace QER.Customizer;1213public abstract class OrgBaseEntityLogic : StateBasedEntityLogic14{15	[StructLayout((LayoutKind)3)]16	[CompilerGenerated]17	private struct _003CValidParentCheck_003Ed__1 : IAsyncStateMachine18	{19		public int _003C_003E1__state;2021		public AsyncTaskMethodBuilder _003C_003Et__builder;2223		public string strUIDObject;2425		public ISession session;2627		public IEntity eObject;2829		public string strPkColumn;3031		public bool checkOrgRoot;3233		public string strRootColumn;3435		public string strTableName;3637		public CancellationToken ct;3839		public string strParentColumn;4041		private ISqlFormatter _003CfSql_003E5__2;4243		private ConfiguredTaskAwaiter<string> _003C_003Eu__1;4445		private ConfiguredTaskAwaiter<ICultureDependentString> _003C_003Eu__2;4647		private ConfiguredTaskAwaiter _003C_003Eu__3;4849		private void MoveNext()50		{51			//IL_0107: Unknown result type (might be due to invalid IL or missing references)52			//IL_010c: Unknown result type (might be due to invalid IL or missing references)53			//IL_0113: Unknown result type (might be due to invalid IL or missing references)54			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)55			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)56			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)57			//IL_0267: Unknown result type (might be due to invalid IL or missing references)58			//IL_026c: Unknown result type (might be due to invalid IL or missing references)59			//IL_0273: Unknown result type (might be due to invalid IL or missing references)60			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)61			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)62			//IL_0306: Unknown result type (might be due to invalid IL or missing references)63			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)64			//IL_02be: Unknown result type (might be due to invalid IL or missing references)65			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)66			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)67			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)68			//IL_015a: Unknown result type (might be due to invalid IL or missing references)69			//IL_0165: Unknown result type (might be due to invalid IL or missing references)70			//IL_016a: Unknown result type (might be due to invalid IL or missing references)71			//IL_016e: Unknown result type (might be due to invalid IL or missing references)72			//IL_0173: Unknown result type (might be due to invalid IL or missing references)73			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)74			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)75			//IL_0221: Unknown result type (might be due to invalid IL or missing references)76			//IL_022c: Unknown result type (might be due to invalid IL or missing references)77			//IL_0231: Unknown result type (might be due to invalid IL or missing references)78			//IL_0234: Unknown result type (might be due to invalid IL or missing references)79			//IL_0239: Unknown result type (might be due to invalid IL or missing references)80			//IL_0188: Unknown result type (might be due to invalid IL or missing references)81			//IL_018a: Unknown result type (might be due to invalid IL or missing references)82			//IL_024d: Unknown result type (might be due to invalid IL or missing references)83			//IL_024e: Unknown result type (might be due to invalid IL or missing references)84			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)85			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)86			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)87			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)88			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)89			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)90			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)91			int num = _003C_003E1__state;92			try93			{94				ConfiguredTaskAwaiter<ICultureDependentString> val3;95				ConfiguredTaskAwaiter<string> val2;96				ConfiguredTaskAwaiter val;97				string result;98				string result2;99				ConfiguredTaskAwaitable val4;100				ICultureDependentString result3;101				switch (num)102				{103				default:104					if (!string.IsNullOrEmpty(strUIDObject))105					{106						_003CfSql_003E5__2 = session.SqlFormatter();107						if (string.Equals(strUIDObject, eObject.GetValue<string>(strPkColumn), (StringComparison)5))108						{109							throw new ViException(2133005, ExceptionRelevance.EndUser);110						}111						if (checkOrgRoot && !string.IsNullOrEmpty(eObject.GetValue<string>(strRootColumn)))112						{113							val2 = session.Source().GetSingleValueAsync<string>(strTableName, strRootColumn, _003CfSql_003E5__2.Comparison(strPkColumn, strUIDObject, ValType.String, CompareOperator.Equal, FormatterOptions.None), ct).ConfigureAwait(false)114								.GetAwaiter();115							if (!val2.IsCompleted)116							{117								num = (_003C_003E1__state = 0);118								_003C_003Eu__1 = val2;119								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003CValidParentCheck_003Ed__1>(ref val2, ref this);120								return;121							}122							goto IL_0122;123						}124						goto IL_01df;125					}126					goto end_IL_0007;127				case 0:128					val2 = _003C_003Eu__1;129					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<string>);130					num = (_003C_003E1__state = -1);131					goto IL_0122;132				case 1:133					val3 = _003C_003Eu__2;134					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<ICultureDependentString>);135					num = (_003C_003E1__state = -1);136					goto IL_01bf;137				case 2:138					val2 = _003C_003Eu__1;139					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<string>);140					num = (_003C_003E1__state = -1);141					goto IL_0282;142				case 3:143					{144						val = _003C_003Eu__3;145						_003C_003Eu__3 = default(ConfiguredTaskAwaiter);146						num = (_003C_003E1__state = -1);147						goto IL_0315;148					}149					IL_01df:150					if (!eObject.IsLoaded)151					{152						break;153					}154					val2 = session.Source().GetSingleValueAsync<string>(strTableName, strParentColumn, _003CfSql_003E5__2.Comparison(strPkColumn, strUIDObject, ValType.String, CompareOperator.Equal, FormatterOptions.None), ct).ConfigureAwait(false)155						.GetAwaiter();156					if (!val2.IsCompleted)157					{158						num = (_003C_003E1__state = 2);159						_003C_003Eu__1 = val2;160						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003CValidParentCheck_003Ed__1>(ref val2, ref this);161						return;162					}163					goto IL_0282;164					IL_0122:165					result = val2.GetResult();166					if (!string.Equals(eObject.GetValue<string>(strRootColumn), result, (StringComparison)5))167					{168						val3 = eObject.GetDisplayNameAsync(session, strRootColumn, ct).ConfigureAwait(false).GetAwaiter();169						if (!val3.IsCompleted)170						{171							num = (_003C_003E1__state = 1);172							_003C_003Eu__2 = val3;173							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<ICultureDependentString>, _003CValidParentCheck_003Ed__1>(ref val3, ref this);174							return;175						}176						goto IL_01bf;177					}178					goto IL_01df;179					IL_0282:180					result2 = val2.GetResult();181					val4 = ValidParentCheck(session, eObject, result2, strPkColumn, strParentColumn, strTableName, checkOrgRoot: false, strRootColumn, ct).ConfigureAwait(false);182					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();183					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)184					{185						num = (_003C_003E1__state = 3);186						_003C_003Eu__3 = val;187						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CValidParentCheck_003Ed__1>(ref val, ref this);188						return;189					}190					goto IL_0315;191					IL_0315:192					((ConfiguredTaskAwaiter)(ref val)).GetResult();193					break;194					IL_01bf:195					result3 = val3.GetResult();196					throw new ViException(2133014, ExceptionRelevance.EndUser, result3);197				}198				_003CfSql_003E5__2 = null;199				end_IL_0007:;200			}201			catch (System.Exception exception)202			{203				_003C_003E1__state = -2;204				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);205				return;206			}207			_003C_003E1__state = -2;208			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();209		}210211		[DebuggerHidden]212		private void SetStateMachine(IAsyncStateMachine stateMachine)213		{214			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);215		}216	}217218	[StructLayout((LayoutKind)3)]219	[CompilerGenerated]220	private struct _003C_CanAssign_003Ed__2 : IAsyncStateMachine221	{222		public int _003C_003E1__state;223224		public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;225226		public string tableName;227228		public ISession session;229230		public IEntity entity;231232		public CancellationToken ct;233234		private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;235236		private void MoveNext()237		{238			//IL_0104: Unknown result type (might be due to invalid IL or missing references)239			//IL_0109: Unknown result type (might be due to invalid IL or missing references)240			//IL_0111: Unknown result type (might be due to invalid IL or missing references)241			//IL_00be: Unknown result type (might be due to invalid IL or missing references)242			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)243			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)244			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)245			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)246			//IL_001a: Unknown result type (might be due to invalid IL or missing references)247			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)248			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)249			int num = _003C_003E1__state;250			bool result;251			try252			{253				ConfiguredTaskAwaiter<bool> val;254				if (num != 0)255				{256					if (tableName == null)257					{258						throw new ArgumentNullException("tableName");259					}260					ISqlFormatter sqlFormatter = session.SqlFormatter();261					string whereclause = sqlFormatter.AndRelation(sqlFormatter.UidComparison("UID_OrgRoot", entity.GetValue("UID_OrgRoot")), sqlFormatter.Comparison("IsDirectAssignmentAllowed", true, ValType.Bool), sqlFormatter.FkComparison("UID_BaseTreeAssign", "BaseTreeAssign", sqlFormatter.FkComparison("UID_DialogTableElement", "UID_DialogTable", "DialogTable", sqlFormatter.Comparison("TableName", tableName, ValType.String))));262					val = session.Source().ExistsAsync("OrgRootAssign", whereclause, ct).ConfigureAwait(false)263						.GetAwaiter();264					if (!val.IsCompleted)265					{266						num = (_003C_003E1__state = 0);267						_003C_003Eu__1 = val;268						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003C_CanAssign_003Ed__2>(ref val, ref this);269						return;270					}271				}272				else273				{274					val = _003C_003Eu__1;275					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);276					num = (_003C_003E1__state = -1);277				}278				result = val.GetResult();279			}280			catch (System.Exception exception)281			{282				_003C_003E1__state = -2;283				_003C_003Et__builder.SetException(exception);284				return;285			}286			_003C_003E1__state = -2;287			_003C_003Et__builder.SetResult(result);288		}289290		[DebuggerHidden]291		private void SetStateMachine(IAsyncStateMachine stateMachine)292		{293			_003C_003Et__builder.SetStateMachine(stateMachine);294		}295	}296297	public OrgBaseEntityLogic()298	{299		CanEdit("UID_OrgRoot").From("UID_OrgRoot", "[IsLoaded]").As<string, bool>((Func<string, bool, bool>)((string orgRoot, bool bLoaded) => !bLoaded || string.IsNullOrEmpty(orgRoot)));300		RegisterFunction("CanAssign").As<string, bool>(_CanAssign).Description("Method_OrgBaseEntityLogic_CanAssign").Behavior(MethodBehavior.ValidForReadOnlyUser);301	}302303	[AsyncStateMachine(typeof(_003CValidParentCheck_003Ed__1))]304	public static System.Threading.Tasks.Task ValidParentCheck(ISession session, IEntity eObject, string strUIDObject, string strPkColumn, string strParentColumn, string strTableName, bool checkOrgRoot, string strRootColumn, CancellationToken ct)305	{306		//IL_0002: Unknown result type (might be due to invalid IL or missing references)307		//IL_0007: Unknown result type (might be due to invalid IL or missing references)308		//IL_0052: Unknown result type (might be due to invalid IL or missing references)309		//IL_0054: Unknown result type (might be due to invalid IL or missing references)310		_003CValidParentCheck_003Ed__1 _003CValidParentCheck_003Ed__ = default(_003CValidParentCheck_003Ed__1);311		_003CValidParentCheck_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();312		_003CValidParentCheck_003Ed__.session = session;313		_003CValidParentCheck_003Ed__.eObject = eObject;314		_003CValidParentCheck_003Ed__.strUIDObject = strUIDObject;315		_003CValidParentCheck_003Ed__.strPkColumn = strPkColumn;316		_003CValidParentCheck_003Ed__.strParentColumn = strParentColumn;317		_003CValidParentCheck_003Ed__.strTableName = strTableName;318		_003CValidParentCheck_003Ed__.checkOrgRoot = checkOrgRoot;319		_003CValidParentCheck_003Ed__.strRootColumn = strRootColumn;320		_003CValidParentCheck_003Ed__.ct = ct;321		_003CValidParentCheck_003Ed__._003C_003E1__state = -1;322		((AsyncTaskMethodBuilder)(ref _003CValidParentCheck_003Ed__._003C_003Et__builder)).Start<_003CValidParentCheck_003Ed__1>(ref _003CValidParentCheck_003Ed__);323		return ((AsyncTaskMethodBuilder)(ref _003CValidParentCheck_003Ed__._003C_003Et__builder)).Task;324	}325326	[AsyncStateMachine(typeof(_003C_CanAssign_003Ed__2))]327	private static async System.Threading.Tasks.Task<bool> _CanAssign(ISession session, IEntity entity, string tableName, CancellationToken ct)328	{329		//IL_0002: Unknown result type (might be due to invalid IL or missing references)330		//IL_0007: Unknown result type (might be due to invalid IL or missing references)331		//IL_0026: Unknown result type (might be due to invalid IL or missing references)332		//IL_0027: Unknown result type (might be due to invalid IL or missing references)333		if (tableName == null)334		{335			throw new ArgumentNullException("tableName");336		}337		ISqlFormatter sqlFormatter = session.SqlFormatter();338		string whereclause = sqlFormatter.AndRelation(sqlFormatter.UidComparison("UID_OrgRoot", entity.GetValue("UID_OrgRoot")), sqlFormatter.Comparison("IsDirectAssignmentAllowed", true, ValType.Bool), sqlFormatter.FkComparison("UID_BaseTreeAssign", "BaseTreeAssign", sqlFormatter.FkComparison("UID_DialogTableElement", "UID_DialogTable", "DialogTable", sqlFormatter.Comparison("TableName", tableName, ValType.String))));339		return await session.Source().ExistsAsync("OrgRootAssign", whereclause, ct).ConfigureAwait(false);340	}341}342