Back to OIM Explorer

QER.CompositionApi/QER.CompositionApi.Role/RoleAssignCompare.cs

Decompiler Source FileQER.CompositionApi.RoleAssignCompareDecompiled Source

2 extracted method/event/call references in RoleAssignCompare.

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

Source size: 12.821 characters

Interpretation

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

Relations

  • CallFunctionAsync: CanAssign at line 105
  • CallFunctionAsync: CanAssign at line 277

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.

references DB/Dialog objects

Summary: classes RoleAssignCompare; methods MoveNext, SetStateMachine, GetMergeActionsAsync; references Delegation; markers references DB/Dialog objects

Classes

RoleAssignCompare

DB/Dialog object references

OIM key/entity markers

None extracted.

API/entity calls

TryResult GetObjectKey

Registrations / handlers

None extracted.

Complete Source

C#310 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;10using QBM.CompositionApi.UiAction;11using QER.CompositionApi.History;12using VI.Base;13using VI.DB;14using VI.DB.Entities;1516namespace QER.CompositionApi.Role;1718internal class RoleAssignCompare : IRoleCompareItem19{20	[StructLayout((LayoutKind)3)]21	[CompilerGenerated]22	private struct _003CGetMergeActionsAsync_003Ed__17 : IAsyncStateMachine23	{24		public int _003C_003E1__state;2526		public AsyncTaskMethodBuilder<System.Collections.Generic.IEnumerable<IUiAction>> _003C_003Et__builder;2728		public RoleAssignCompare _003C_003E4__this;2930		public IEntity target;3132		public CancellationToken ct;3334		public ISession session;3536		public DbObjectKey key2;3738		public DbObjectKey key1;3940		private XOrigin _003Corigin_003E5__2;4142		private string _003CactionId_003E5__3;4344		private ConfiguredValueTaskAwaiter<object> _003C_003Eu__1;4546		private CreatePwoAction _003CcreatePwo_003E5__4;4748		private ConfiguredTaskAwaiter<TryResult<string>> _003C_003Eu__2;4950		private ConfiguredTaskAwaiter _003C_003Eu__3;5152		private void MoveNext()53		{54			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)55			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)56			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)57			//IL_0204: Unknown result type (might be due to invalid IL or missing references)58			//IL_0209: Unknown result type (might be due to invalid IL or missing references)59			//IL_0211: Unknown result type (might be due to invalid IL or missing references)60			//IL_032a: Unknown result type (might be due to invalid IL or missing references)61			//IL_032f: Unknown result type (might be due to invalid IL or missing references)62			//IL_0337: Unknown result type (might be due to invalid IL or missing references)63			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)64			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)65			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)66			//IL_02f5: Unknown result type (might be due to invalid IL or missing references)67			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)68			//IL_0070: Unknown result type (might be due to invalid IL or missing references)69			//IL_007f: Unknown result type (might be due to invalid IL or missing references)70			//IL_0084: Unknown result type (might be due to invalid IL or missing references)71			//IL_0088: Unknown result type (might be due to invalid IL or missing references)72			//IL_008d: Unknown result type (might be due to invalid IL or missing references)73			//IL_030f: Unknown result type (might be due to invalid IL or missing references)74			//IL_0311: Unknown result type (might be due to invalid IL or missing references)75			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)76			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)77			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)78			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)79			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)80			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)81			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)82			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)83			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)84			int num = _003C_003E1__state;85			RoleAssignCompare roleAssignCompare = _003C_003E4__this;86			System.Collections.Generic.IEnumerable<IUiAction> result;87			try88			{89				ConfiguredValueTaskAwaiter<object> val3;90				ConfiguredTaskAwaiter<TryResult<string>> val2;91				ConfiguredTaskAwaiter val;92				DbObjectKey objectKey;93				ConfiguredTaskAwaitable val4;94				TryResult<string> result2;95				switch (num)96				{97				default:98					_003Corigin_003E5__2 = (XOrigin)roleAssignCompare.XOriginRole2;99					if (roleAssignCompare.XOriginRole1 > 0 || _003Corigin_003E5__2 == XOrigin.None)100					{101						result = Enumerable.Empty<IUiAction>();102						break;103					}104					_003CactionId_003E5__3 = roleAssignCompare.Key.ToXmlString();105					val3 = target.CallFunctionAsync("CanAssign", roleAssignCompare.Key.Tablename, ct).ConfigureAwait(false).GetAwaiter();106					if (!val3.IsCompleted)107					{108						num = (_003C_003E1__state = 0);109						_003C_003Eu__1 = val3;110						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<object>, _003CGetMergeActionsAsync_003Ed__17>(ref val3, ref this);111						return;112					}113					goto IL_00d6;114				case 0:115					val3 = _003C_003Eu__1;116					_003C_003Eu__1 = default(ConfiguredValueTaskAwaiter<object>);117					num = (_003C_003E1__state = -1);118					goto IL_00d6;119				case 1:120					val2 = _003C_003Eu__2;121					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<TryResult<string>>);122					num = (_003C_003E1__state = -1);123					goto IL_0220;124				case 2:125					{126						val = _003C_003Eu__3;127						_003C_003Eu__3 = default(ConfiguredTaskAwaiter);128						num = (_003C_003E1__state = -1);129						goto IL_0346;130					}131					IL_026e:132					objectKey = DbObjectKey.GetObjectKey(roleAssignCompare._asgnTableInfo.TableName, roleAssignCompare._asgnTableInfo.ColumnNameEntitlement, roleAssignCompare.Key.Keys[0], roleAssignCompare._asgnTableInfo.ColumnNameBasetree, key1.Keys[0]);133					_003CcreatePwo_003E5__4 = new CreatePwoAction(objectKey.ToXmlString(), roleAssignCompare.Display, _003CactionId_003E5__3);134					val4 = _003CcreatePwo_003E5__4.InitAsync(session, roleAssignCompare._translator, ct).ConfigureAwait(false);135					val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();136					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)137					{138						num = (_003C_003E1__state = 2);139						_003C_003Eu__3 = val;140						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CGetMergeActionsAsync_003Ed__17>(ref val, ref this);141						return;142					}143					goto IL_0346;144					IL_0346:145					((ConfiguredTaskAwaiter)(ref val)).GetResult();146					result = new CreatePwoAction[1] { _003CcreatePwo_003E5__4 };147					break;148					IL_0220:149					result2 = val2.GetResult();150					if (result2.Success)151					{152						result = new ImpossibleAction[1]153						{154							new ImpossibleAction(roleAssignCompare.Display, string.Format(roleAssignCompare._translator.TranslateControlText(TranslatableKeys.NotRecreatingDelegatedMembership), (object)result2.Result), _003CactionId_003E5__3)155						};156						break;157					}158					goto IL_026e;159					IL_00d6:160					if (!(bool)val3.GetResult())161					{162						result = new ImpossibleAction[1]163						{164							new ImpossibleAction(roleAssignCompare.Display, roleAssignCompare._translator.TranslateControlText(TranslatableKeys.CannotAssignToThisRoleType), _003CactionId_003E5__3)165						};166						break;167					}168					if (((System.Enum)_003Corigin_003E5__2).HasFlag((System.Enum)XOrigin.Direct) || ((System.Enum)_003Corigin_003E5__2).HasFlag((System.Enum)XOrigin.Ordered) || ((System.Enum)_003Corigin_003E5__2).HasFlag((System.Enum)XOrigin.Dynamic))169					{170						if (_003Corigin_003E5__2 == XOrigin.Ordered)171						{172							DelegationHelper delegationHelper = new DelegationHelper(session);173							DbObjectKey objectKey2 = DbObjectKey.GetObjectKey(roleAssignCompare._asgnTableInfo.TableName, roleAssignCompare._asgnTableInfo.ColumnNameEntitlement, roleAssignCompare.Key.Keys[0], roleAssignCompare._asgnTableInfo.ColumnNameBasetree, key2.Keys[0]);174							val2 = delegationHelper.TryGetActiveDelegationAsync(objectKey2, ct).ConfigureAwait(false).GetAwaiter();175							if (!val2.IsCompleted)176							{177								num = (_003C_003E1__state = 1);178								_003C_003Eu__2 = val2;179								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<TryResult<string>>, _003CGetMergeActionsAsync_003Ed__17>(ref val2, ref this);180								return;181							}182							goto IL_0220;183						}184						goto IL_026e;185					}186					result = new ImpossibleAction[1]187					{188						new ImpossibleAction(roleAssignCompare.Display, roleAssignCompare._translator.TranslateControlText(TranslatableKeys.NotRecreatingInheritedAssignment), _003CactionId_003E5__3)189					};190					break;191				}192			}193			catch (System.Exception exception)194			{195				_003C_003E1__state = -2;196				_003CactionId_003E5__3 = null;197				_003C_003Et__builder.SetException(exception);198				return;199			}200			_003C_003E1__state = -2;201			_003CactionId_003E5__3 = null;202			_003C_003Et__builder.SetResult(result);203		}204205		[DebuggerHidden]206		private void SetStateMachine(IAsyncStateMachine stateMachine)207		{208			_003C_003Et__builder.SetStateMachine(stateMachine);209		}210	}211212	private readonly AssignTableInfo _asgnTableInfo;213214	private readonly ITranslator _translator;215216	/// <summary>217	/// Key of the entitlement object.218	/// </summary>219	[field: CompilerGenerated]220	public DbObjectKey Key221	{222		[CompilerGenerated]223		get;224	}225226	[field: CompilerGenerated]227	public string Display228	{229		[CompilerGenerated]230		get;231	}232233	public string DbTableName => Key.Tablename;234235	[field: CompilerGenerated]236	public int XOriginRole1237	{238		[CompilerGenerated]239		get;240	}241242	[field: CompilerGenerated]243	public int XOriginRole2244	{245		[CompilerGenerated]246		get;247	}248249	public RoleAssignCompare(string display, int xOriginRole1, int xOriginRole2, DbObjectKey objKey, AssignTableInfo asgnTableInfo, ITranslator translator)250	{251		//IL_0010: Unknown result type (might be due to invalid IL or missing references)252		if (objKey == null)253		{254			throw new ArgumentNullException();255		}256		Display = display;257		XOriginRole1 = xOriginRole1;258		XOriginRole2 = xOriginRole2;259		Key = objKey;260		_asgnTableInfo = asgnTableInfo;261		_translator = translator;262	}263264	[AsyncStateMachine(typeof(_003CGetMergeActionsAsync_003Ed__17))]265	public async System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IUiAction>> GetMergeActionsAsync(ISession session, IEntity target, DbObjectKey key1, DbObjectKey key2, CancellationToken ct = default(CancellationToken))266	{267		//IL_0002: Unknown result type (might be due to invalid IL or missing references)268		//IL_0007: Unknown result type (might be due to invalid IL or missing references)269		//IL_0037: Unknown result type (might be due to invalid IL or missing references)270		//IL_0039: Unknown result type (might be due to invalid IL or missing references)271		XOrigin origin = (XOrigin)XOriginRole2;272		if (XOriginRole1 > 0 || origin == XOrigin.None)273		{274			return Enumerable.Empty<IUiAction>();275		}276		string actionId = Key.ToXmlString();277		if (!(bool)(await target.CallFunctionAsync("CanAssign", Key.Tablename, ct).ConfigureAwait(false)))278		{279			return new ImpossibleAction[1]280			{281				new ImpossibleAction(Display, _translator.TranslateControlText(TranslatableKeys.CannotAssignToThisRoleType), actionId)282			};283		}284		if (((System.Enum)origin).HasFlag((System.Enum)XOrigin.Direct) || ((System.Enum)origin).HasFlag((System.Enum)XOrigin.Ordered) || ((System.Enum)origin).HasFlag((System.Enum)XOrigin.Dynamic))285		{286			if (origin == XOrigin.Ordered)287			{288				DelegationHelper delegationHelper = new DelegationHelper(session);289				DbObjectKey objectKey = DbObjectKey.GetObjectKey(_asgnTableInfo.TableName, _asgnTableInfo.ColumnNameEntitlement, Key.Keys[0], _asgnTableInfo.ColumnNameBasetree, key2.Keys[0]);290				TryResult<string> tryResult = await delegationHelper.TryGetActiveDelegationAsync(objectKey, ct).ConfigureAwait(false);291				if (tryResult.Success)292				{293					return new ImpossibleAction[1]294					{295						new ImpossibleAction(Display, string.Format(_translator.TranslateControlText(TranslatableKeys.NotRecreatingDelegatedMembership), (object)tryResult.Result), actionId)296					};297				}298			}299			DbObjectKey objectKey2 = DbObjectKey.GetObjectKey(_asgnTableInfo.TableName, _asgnTableInfo.ColumnNameEntitlement, Key.Keys[0], _asgnTableInfo.ColumnNameBasetree, key1.Keys[0]);300			CreatePwoAction createPwo = new CreatePwoAction(objectKey2.ToXmlString(), Display, actionId);301			await createPwo.InitAsync(session, _translator, ct).ConfigureAwait(false);302			return new CreatePwoAction[1] { createPwo };303		}304		return new ImpossibleAction[1]305		{306			new ImpossibleAction(Display, _translator.TranslateControlText(TranslatableKeys.NotRecreatingInheritedAssignment), actionId)307		};308	}309}310