Back to OIM Explorer

VI.DB/VI.DB.Entities/PendingChange.cs

Decompiler Source FileVI.DB.PendingChangeDecompiled Source

1 extracted method/event/call references in PendingChange.

Source: F:\Claude\.tmp\oim-decompiled-full\1178_One_Identity_Manager_VI.DB.dll\VI.DB.Entities\PendingChange.cs

Source size: 10.377 characters

Interpretation

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

Relations

  • CallMethodAsync: DetailReady at line 160

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.

saves entities references DB/Dialog objects

Summary: classes PendingChange; methods MoveNext, SetStateMachine, SetReadyAsync, SetReady; references QBMPendingChange, QBMPendingChangeDetail; markers saves entities, references DB/Dialog objects

Classes

PendingChange

DB/Dialog object references

OIM key/entity markers

UID_QBMPendingChange ObjectKeyElement

API/entity calls

SaveAsync IsFullSync From Source

Registrations / handlers

None extracted.

Complete Source

C#231 lines
1using System;2using System.Collections.Generic;3using System.Diagnostics;4using System.Runtime.CompilerServices;5using System.Runtime.InteropServices;6using System.Threading;7using System.Threading.Tasks;8using NLog;9using VI.Base;1011namespace VI.DB.Entities;1213public static class PendingChange14{15	[StructLayout((LayoutKind)3)]16	[CompilerGenerated]17	private struct _003CSetReadyAsync_003Ed__0 : IAsyncStateMachine18	{19		public int _003C_003E1__state;2021		public AsyncTaskMethodBuilder _003C_003Et__builder;2223		public ISession session;2425		public DbObjectKey objectKeyElement;2627		public CancellationToken ct;2829		public bool success;3031		private Logger _003Clog_003E5__2;3233		private LogSessionId _003CsessionId_003E5__3;3435		private System.IDisposable _003C_003E7__wrap3;3637		private IEntity _003Cdetail_003E5__5;3839		private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__1;4041		private ConfiguredValueTaskAwaiter _003C_003Eu__2;4243		private ConfiguredTaskAwaiter _003C_003Eu__3;4445		private void MoveNext()46		{47			//IL_0018: Unknown result type (might be due to invalid IL or missing references)48			//IL_0178: Unknown result type (might be due to invalid IL or missing references)49			//IL_017d: Unknown result type (might be due to invalid IL or missing references)50			//IL_0185: Unknown result type (might be due to invalid IL or missing references)51			//IL_0257: Unknown result type (might be due to invalid IL or missing references)52			//IL_025c: Unknown result type (might be due to invalid IL or missing references)53			//IL_0264: Unknown result type (might be due to invalid IL or missing references)54			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)55			//IL_02d5: Unknown result type (might be due to invalid IL or missing references)56			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)57			//IL_0031: Unknown result type (might be due to invalid IL or missing references)58			//IL_0287: Unknown result type (might be due to invalid IL or missing references)59			//IL_0292: Unknown result type (might be due to invalid IL or missing references)60			//IL_0297: Unknown result type (might be due to invalid IL or missing references)61			//IL_029b: Unknown result type (might be due to invalid IL or missing references)62			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)63			//IL_012f: Unknown result type (might be due to invalid IL or missing references)64			//IL_013a: Unknown result type (might be due to invalid IL or missing references)65			//IL_013f: Unknown result type (might be due to invalid IL or missing references)66			//IL_0143: Unknown result type (might be due to invalid IL or missing references)67			//IL_0148: Unknown result type (might be due to invalid IL or missing references)68			//IL_020a: Unknown result type (might be due to invalid IL or missing references)69			//IL_0219: Unknown result type (might be due to invalid IL or missing references)70			//IL_021e: Unknown result type (might be due to invalid IL or missing references)71			//IL_0222: Unknown result type (might be due to invalid IL or missing references)72			//IL_0227: Unknown result type (might be due to invalid IL or missing references)73			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)74			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)75			//IL_015d: Unknown result type (might be due to invalid IL or missing references)76			//IL_015f: Unknown result type (might be due to invalid IL or missing references)77			//IL_023c: Unknown result type (might be due to invalid IL or missing references)78			//IL_023e: Unknown result type (might be due to invalid IL or missing references)79			int num = _003C_003E1__state;80			try81			{82				if ((uint)num > 2u)83				{84					if (session == null)85					{86						throw new ArgumentNullException("session");87					}88					if (objectKeyElement == null)89					{90						throw new ArgumentNullException("objectKeyElement");91					}92					_003Clog_003E5__2 = LogManager.GetLogger("ObjectLog");93					_003CsessionId_003E5__3 = new LogSessionId(session.Id, useMultiLanguage: false);94					_003C_003E7__wrap3 = _003Clog_003E5__2.DebugBlock(_003CsessionId_003E5__3, "Run PendingChange.SetReadyAsync");95				}96				try97				{98					ConfiguredTaskAwaiter<IEntityCollection> val3;99					ConfiguredValueTaskAwaiter val2;100					ConfiguredTaskAwaiter val;101					ConfiguredTaskAwaitable val4;102					IEntityCollection result;103					switch (num)104					{105					default:106						if (!session.IsFullSync())107						{108							ISqlFormatter sqlFormatter = session.Resolve<ISqlFormatter>();109							Query query = Query.From("QBMPendingChangeDetail").Where("exists (\r\n\tselect 1 from QBMPendingChange c \r\n\twhere QBMPendingChangeDetail.UID_QBMPendingChange = c.UID_QBMPendingChange\r\n\tand " + sqlFormatter.UidComparison("c.ObjectKeyElement", objectKeyElement.ToXmlString()) + "\r\n)\r\nand " + sqlFormatter.EmptyClause("IsProcessed", ValType.Int)).OrderBy("CreationDate")110								.Take(1)111								.SelectNonLobs();112							val3 = session.Source().GetCollectionAsync(query, EntityCollectionLoadType.Bulk, ct).ConfigureAwait(false)113								.GetAwaiter();114							if (!val3.IsCompleted)115							{116								num = (_003C_003E1__state = 0);117								_003C_003Eu__1 = val3;118								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003CSetReadyAsync_003Ed__0>(ref val3, ref this);119								return;120							}121							goto IL_0194;122						}123						NLogExtensions.Debug(_003Clog_003E5__2, _003CsessionId_003E5__3, "Do not run PendingChangeReady in FULLSYNC mode.");124						goto end_IL_0007;125					case 0:126						val3 = _003C_003Eu__1;127						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntityCollection>);128						num = (_003C_003E1__state = -1);129						goto IL_0194;130					case 1:131						val2 = _003C_003Eu__2;132						_003C_003Eu__2 = default(ConfiguredValueTaskAwaiter);133						num = (_003C_003E1__state = -1);134						goto IL_0273;135					case 2:136						{137							val = _003C_003Eu__3;138							_003C_003Eu__3 = default(ConfiguredTaskAwaiter);139							num = (_003C_003E1__state = -1);140							break;141						}142						IL_0273:143						((ConfiguredValueTaskAwaiter)(ref val2)).GetResult();144						val4 = _003Cdetail_003E5__5.SaveAsync(session, ct).ConfigureAwait(false);145						val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();146						if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)147						{148							num = (_003C_003E1__state = 2);149							_003C_003Eu__3 = val;150							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CSetReadyAsync_003Ed__0>(ref val, ref this);151							return;152						}153						break;154						IL_0194:155						result = val3.GetResult();156						if (((System.Collections.Generic.IReadOnlyCollection<IEntity>)result).Count != 0)157						{158							NLogExtensions.Debug(_003Clog_003E5__2, _003CsessionId_003E5__3, "Propagating change for {0}", objectKeyElement.ToXmlString());159							_003Cdetail_003E5__5 = ((System.Collections.Generic.IReadOnlyList<IEntity>)result)[0];160							ConfiguredValueTaskAwaitable val5 = _003Cdetail_003E5__5.CallMethodAsync("DetailReady", success, ct).ConfigureAwait(false);161							val2 = ((ConfiguredValueTaskAwaitable)(ref val5)).GetAwaiter();162							if (!((ConfiguredValueTaskAwaiter)(ref val2)).IsCompleted)163							{164								num = (_003C_003E1__state = 1);165								_003C_003Eu__2 = val2;166								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter, _003CSetReadyAsync_003Ed__0>(ref val2, ref this);167								return;168							}169							goto IL_0273;170						}171						NLogExtensions.Debug(_003Clog_003E5__2, _003CsessionId_003E5__3, "No open change found for {0}", objectKeyElement.ToXmlString());172						goto end_IL_0007;173					}174					((ConfiguredTaskAwaiter)(ref val)).GetResult();175					_003Cdetail_003E5__5 = null;176				}177				finally178				{179					if (num < 0 && _003C_003E7__wrap3 != null)180					{181						_003C_003E7__wrap3.Dispose();182					}183				}184				_003C_003E7__wrap3 = null;185				end_IL_0007:;186			}187			catch (System.Exception exception)188			{189				_003C_003E1__state = -2;190				_003Clog_003E5__2 = null;191				_003CsessionId_003E5__3 = null;192				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);193				return;194			}195			_003C_003E1__state = -2;196			_003Clog_003E5__2 = null;197			_003CsessionId_003E5__3 = null;198			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();199		}200201		[DebuggerHidden]202		private void SetStateMachine(IAsyncStateMachine stateMachine)203		{204			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);205		}206	}207208	[AsyncStateMachine(typeof(_003CSetReadyAsync_003Ed__0))]209	public static System.Threading.Tasks.Task SetReadyAsync(ISession session, DbObjectKey objectKeyElement, bool success, CancellationToken ct = default(CancellationToken))210	{211		//IL_0002: Unknown result type (might be due to invalid IL or missing references)212		//IL_0007: Unknown result type (might be due to invalid IL or missing references)213		//IL_0026: Unknown result type (might be due to invalid IL or missing references)214		//IL_0027: Unknown result type (might be due to invalid IL or missing references)215		_003CSetReadyAsync_003Ed__0 _003CSetReadyAsync_003Ed__ = default(_003CSetReadyAsync_003Ed__0);216		_003CSetReadyAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();217		_003CSetReadyAsync_003Ed__.session = session;218		_003CSetReadyAsync_003Ed__.objectKeyElement = objectKeyElement;219		_003CSetReadyAsync_003Ed__.success = success;220		_003CSetReadyAsync_003Ed__.ct = ct;221		_003CSetReadyAsync_003Ed__._003C_003E1__state = -1;222		((AsyncTaskMethodBuilder)(ref _003CSetReadyAsync_003Ed__._003C_003Et__builder)).Start<_003CSetReadyAsync_003Ed__0>(ref _003CSetReadyAsync_003Ed__);223		return ((AsyncTaskMethodBuilder)(ref _003CSetReadyAsync_003Ed__._003C_003Et__builder)).Task;224	}225226	public static void SetReady(ISession session, DbObjectKey objectKeyElement, bool success)227	{228		SyncActions.Do(session, objectKeyElement, success, (ISession s, DbObjectKey o, bool b) => SetReadyAsync(s, o, b));229	}230}231