Back to OIM Explorer

QER.CompositionApi/QER.CompositionApi.AutoRemoval/PwoAutoRemove.cs

Decompiler Source FileQER.CompositionApi.PwoAutoRemoveDecompiled Source

3 extracted method/event/call references in PwoAutoRemove.

Source: F:\Claude\.tmp\oim-decompiled-full\0989_One_Identity_Manager_QER.CompositionApi.dll\QER.CompositionApi.AutoRemoval\PwoAutoRemove.cs

Source size: 11.580 characters

Interpretation

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

Relations

  • CallMethod: MakeDecision at line 159
  • CallMethod: MakeDecision at line 167
  • CallMethod: MakeDecision at line 172

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 PwoAutoRemove; methods MoveNext, SetStateMachine, RunAsync; references Person, PersonWantsOrg, QERJustification; markers reads entity values, references DB/Dialog objects, IT Shop related markers

Classes

PwoAutoRemove

DB/Dialog object references

OIM key/entity markers

UID_QERJustification UID_PersonOrdered

API/entity calls

TryResult CreateSingle GetValue CreateSingle Source

Registrations / handlers

None extracted.

Complete Source

C#244 lines
1using System;2using System.Collections.Generic;3using System.Diagnostics;4using System.Linq;5using System.Runtime.CompilerServices;6using System.Runtime.InteropServices;7using System.Threading;8using System.Threading.Tasks;9using QBM.CompositionApi.PlugIns;10using QBM.CompositionApi.UiAction;11using QER.CompositionApi.Assignment;12using VI.Base;13using VI.DB;14using VI.DB.Entities;1516namespace QER.CompositionApi.AutoRemoval;1718public class PwoAutoRemove19{20	[StructLayout((LayoutKind)3)]21	[CompilerGenerated]22	private struct _003CRunAsync_003Ed__9 : IAsyncStateMachine23	{24		public int _003C_003E1__state;2526		public AsyncTaskMethodBuilder _003C_003Et__builder;2728		public PwoAutoRemove _003C_003E4__this;2930		public CancellationToken ct;3132		private ISingleDbObject _003Cpwo_003E5__2;3334		private AutoRemovalEnvironment _003Cenv_003E5__3;3536		private DbObjectKey _003CdboKey_003E5__4;3738		private bool _003Csuccess_003E5__5;3940		private ConfiguredTaskAwaiter<TryResult<IEntity>> _003C_003Eu__1;4142		private ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<EntitlementRemoveAction>> _003C_003Eu__2;4344		private ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<UiActionResult>> _003C_003Eu__3;4546		private void MoveNext()47		{48			//IL_0170: Unknown result type (might be due to invalid IL or missing references)49			//IL_0175: Unknown result type (might be due to invalid IL or missing references)50			//IL_017d: Unknown result type (might be due to invalid IL or missing references)51			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)52			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)53			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)54			//IL_036c: Unknown result type (might be due to invalid IL or missing references)55			//IL_0371: Unknown result type (might be due to invalid IL or missing references)56			//IL_0379: Unknown result type (might be due to invalid IL or missing references)57			//IL_0127: Unknown result type (might be due to invalid IL or missing references)58			//IL_0132: Unknown result type (might be due to invalid IL or missing references)59			//IL_0137: Unknown result type (might be due to invalid IL or missing references)60			//IL_013b: Unknown result type (might be due to invalid IL or missing references)61			//IL_0140: Unknown result type (might be due to invalid IL or missing references)62			//IL_0323: Unknown result type (might be due to invalid IL or missing references)63			//IL_032e: Unknown result type (might be due to invalid IL or missing references)64			//IL_0333: Unknown result type (might be due to invalid IL or missing references)65			//IL_0337: Unknown result type (might be due to invalid IL or missing references)66			//IL_033c: Unknown result type (might be due to invalid IL or missing references)67			//IL_0155: Unknown result type (might be due to invalid IL or missing references)68			//IL_0157: Unknown result type (might be due to invalid IL or missing references)69			//IL_02a2: Unknown result type (might be due to invalid IL or missing references)70			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)71			//IL_02b2: Unknown result type (might be due to invalid IL or missing references)72			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)73			//IL_02bb: Unknown result type (might be due to invalid IL or missing references)74			//IL_0351: Unknown result type (might be due to invalid IL or missing references)75			//IL_0353: Unknown result type (might be due to invalid IL or missing references)76			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)77			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)78			int num = _003C_003E1__state;79			PwoAutoRemove pwoAutoRemove = _003C_003E4__this;80			try81			{82				ConfiguredTaskAwaiter<TryResult<IEntity>> val3;83				ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<EntitlementRemoveAction>> val2;84				ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<UiActionResult>> val;85				System.Collections.Generic.IEnumerable<EntitlementRemoveAction> result;86				TryResult<IEntity> result2;87				string text;88				switch (num)89				{90				default:91				{92					_003Cpwo_003E5__2 = pwoAutoRemove.Connection.CreateSingle("PersonWantsOrg", pwoAutoRemove.UidPwo);93					DbVal value = _003Cpwo_003E5__2.GetValue("ReasonHead");94					string displayValue = _003Cpwo_003E5__2["UID_QERJustification"].GetDisplayValue();95					global::_003C_003Ey__InlineArray2<string> buffer = default(global::_003C_003Ey__InlineArray2<string>);96					global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray2<string>, string>(ref buffer, 0) = value;97					global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray2<string>, string>(ref buffer, 1) = displayValue;98					string reasonHead = string.Join(" ", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray2<string>, string>(in buffer, 2)).Trim();99					ConfigParmAutoRemovalConfig config = new ConfigParmAutoRemovalConfig("QER\\ITShop\\AutoRemovalScope", pwoAutoRemove.Connection.Session, pwoAutoRemove._plugins);100					_003Cenv_003E5__3 = new AutoRemovalEnvironment(pwoAutoRemove.Connection, config, reasonHead, new DbObjectKey(_003Cpwo_003E5__2), _003Cpwo_003E5__2.GetValue("UID_PersonOrdered"));101					_003CdboKey_003E5__4 = new DbObjectKey(_003Cpwo_003E5__2.GetValue("OrderDetail1"));102					val3 = _003Cenv_003E5__3.Session.Source().TryGetAsync(_003CdboKey_003E5__4, EntityLoadType.Interactive, ct).ConfigureAwait(false)103						.GetAwaiter();104					if (!val3.IsCompleted)105					{106						num = (_003C_003E1__state = 0);107						_003C_003Eu__1 = val3;108						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<TryResult<IEntity>>, _003CRunAsync_003Ed__9>(ref val3, ref this);109						return;110					}111					goto IL_018c;112				}113				case 0:114					val3 = _003C_003Eu__1;115					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<TryResult<IEntity>>);116					num = (_003C_003E1__state = -1);117					goto IL_018c;118				case 1:119					val2 = _003C_003Eu__2;120					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<EntitlementRemoveAction>>);121					num = (_003C_003E1__state = -1);122					goto IL_0307;123				case 2:124					{125						val = _003C_003Eu__3;126						_003C_003Eu__3 = default(ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<UiActionResult>>);127						num = (_003C_003E1__state = -1);128						break;129					}130					IL_0307:131					result = val2.GetResult();132					val = new ActionRunner(pwoAutoRemove.Connection.Session, (System.Collections.Generic.IEnumerable<IUiAction>)result).RunAsync(ct).ConfigureAwait(false).GetAwaiter();133					if (!val.IsCompleted)134					{135						num = (_003C_003E1__state = 2);136						_003C_003Eu__3 = val;137						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<UiActionResult>>, _003CRunAsync_003Ed__9>(ref val, ref this);138						return;139					}140					break;141					IL_018c:142					result2 = val3.GetResult();143					if (result2.Success)144					{145						AutoRemovalType autoRemovalScope = _003Cenv_003E5__3.GetAutoRemovalScope("GroupMembership");146						_003Csuccess_003E5__5 = true;147						val2 = _003Cenv_003E5__3.RemoveMembership(result2.Result, autoRemovalScope, ct).ConfigureAwait(false).GetAwaiter();148						if (!val2.IsCompleted)149						{150							num = (_003C_003E1__state = 1);151							_003C_003Eu__2 = val2;152							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<System.Collections.Generic.IEnumerable<EntitlementRemoveAction>>, _003CRunAsync_003Ed__9>(ref val2, ref this);153							return;154						}155						goto IL_0307;156					}157					_003Cenv_003E5__3.Actions.Add((IUiAction)new EntitlementRemoveAction(new ImpossibleAction("", _003Cenv_003E5__3.Translate("Group membership already removed. No action taken."), null), _003CdboKey_003E5__4, new DbObjectKey(_003Cpwo_003E5__2), _003Cpwo_003E5__2.GetValue("UID_PersonOrdered")));158					text = string.Join(Environment.NewLine, Enumerable.Select<IUiAction, string>((System.Collections.Generic.IEnumerable<IUiAction>)_003Cenv_003E5__3.Actions, (Func<IUiAction, string>)((IUiAction a) => a.Display + " (" + a.ObjectDisplay + ")")));159					_003Cpwo_003E5__2.Custom.CallMethod("MakeDecision", "", false, text);160					_003Cpwo_003E5__2.Save();161					goto end_IL_000e;162				}163				val.GetResult();164				string text2 = string.Join(Environment.NewLine, Enumerable.Select<IUiAction, string>((System.Collections.Generic.IEnumerable<IUiAction>)_003Cenv_003E5__3.Actions, (Func<IUiAction, string>)((IUiAction a) => a.Display + " (" + a.ObjectDisplay + ")")));165				if (_003Csuccess_003E5__5)166				{167					_003Cpwo_003E5__2.Custom.CallMethod("MakeDecision", "", true, text2);168					_003Cpwo_003E5__2.Save();169				}170				else171				{172					_003Cpwo_003E5__2.Custom.CallMethod("MakeDecision", "", false, text2);173					_003Cpwo_003E5__2.Save();174				}175				end_IL_000e:;176			}177			catch (System.Exception exception)178			{179				_003C_003E1__state = -2;180				_003Cpwo_003E5__2 = null;181				_003Cenv_003E5__3 = null;182				_003CdboKey_003E5__4 = null;183				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);184				return;185			}186			_003C_003E1__state = -2;187			_003Cpwo_003E5__2 = null;188			_003Cenv_003E5__3 = null;189			_003CdboKey_003E5__4 = null;190			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();191		}192193		[DebuggerHidden]194		private void SetStateMachine(IAsyncStateMachine stateMachine)195		{196			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);197		}198	}199200	private readonly IPluginService _plugins;201202	[field: CompilerGenerated]203	public string UidPwo204	{205		[CompilerGenerated]206		get;207	}208209	[field: CompilerGenerated]210	private IConnection Connection211	{212		[CompilerGenerated]213		get;214	}215216	public PwoAutoRemove(IConnection connection, string uidPwo)217		: this(connection, uidPwo, PluginConfiguration.Default)218	{219	}220221	public PwoAutoRemove(IConnection connection, string uidPwo, IPluginService plugins)222	{223		Connection = connection;224		UidPwo = uidPwo;225		_plugins = plugins;226	}227228	[AsyncStateMachine(typeof(_003CRunAsync_003Ed__9))]229	public System.Threading.Tasks.Task RunAsync(CancellationToken ct = default(CancellationToken))230	{231		//IL_0002: Unknown result type (might be due to invalid IL or missing references)232		//IL_0007: Unknown result type (might be due to invalid IL or missing references)233		//IL_0016: Unknown result type (might be due to invalid IL or missing references)234		//IL_0017: Unknown result type (might be due to invalid IL or missing references)235		_003CRunAsync_003Ed__9 _003CRunAsync_003Ed__ = default(_003CRunAsync_003Ed__9);236		_003CRunAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();237		_003CRunAsync_003Ed__._003C_003E4__this = this;238		_003CRunAsync_003Ed__.ct = ct;239		_003CRunAsync_003Ed__._003C_003E1__state = -1;240		((AsyncTaskMethodBuilder)(ref _003CRunAsync_003Ed__._003C_003Et__builder)).Start<_003CRunAsync_003Ed__9>(ref _003CRunAsync_003Ed__);241		return ((AsyncTaskMethodBuilder)(ref _003CRunAsync_003Ed__._003C_003Et__builder)).Task;242	}243}244