Back to OIM Explorer

VI.DB/VI.DB.Entities/EntityLock.cs

Decompiler Source FileVI.DB.EntityLockDecompiled Source

1 extracted method/event/call references in EntityLock.

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

Source size: 53.441 characters

Interpretation

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

Relations

  • CallMethodAsync: SetLockStateForDisplay at line 444

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 EntityLock, _003C_003Ec__DisplayClass3_0, _003C_003Ec__DisplayClass3_1; methods _003CLockColumnsAsync_003Eb__0, _003CLockColumnsAsync_003Eb__1, _003CLockColumnsAsync_003Eb__2, _003CLockColumnsAsync_003Eb__4, _003CLockColumnsAsync_003Eb__7, _003CLockColumnsAsync_003Eb__6; references DialogColumn, QBMLock; markers reads entity values, references DB/Dialog objects

Classes

EntityLock _003C_003Ec__DisplayClass3_0 _003C_003Ec__DisplayClass3_1

DB/Dialog object references

OIM key/entity markers

ObjectKeyOfRow UID_DialogColumn

API/entity calls

GetValue ExistsAsync From Source CreateAsync MetaData CallMethodAsync

Registrations / handlers

None extracted.

Complete Source

C#1.193 lines
1using System;2using System.Collections;3using System.Collections.Generic;4using System.Diagnostics;5using System.Linq;6using System.Runtime.CompilerServices;7using System.Runtime.InteropServices;8using System.Threading;9using System.Threading.Tasks;10using VI.Base;11using VI.DB.MetaData;1213namespace VI.DB.Entities;1415public static class EntityLock16{17	[CompilerGenerated]18	private sealed class _003C_003Ec__DisplayClass3_019	{20		public IMetaTable table;2122		public string keyString;2324		public string[] columnUids;2526		internal string _003CLockColumnsAsync_003Eb__0(string c)27		{28			return table.Columns[c].Uid;29		}3031		internal ExpressionClause _003CLockColumnsAsync_003Eb__1(IExpressionContext t)32		{33			return t.Column("ObjectKeyOfRow") == keyString;34		}3536		internal ExpressionClause _003CLockColumnsAsync_003Eb__2(IExpressionContext t)37		{38			return t.Column("UID_DialogColumn").In(columnUids);39		}4041		internal ExpressionClause _003CLockColumnsAsync_003Eb__4(IExpressionContext t)42		{43			return t.Column("ObjectKeyOfRow") == keyString && t.Column("UID_DialogColumn").In(columnUids);44		}4546		internal ExpressionClause _003CLockColumnsAsync_003Eb__7(IExpressionContext t)47		{48			return t.Column("ObjectKeyOfRow") == keyString;49		}50	}5152	[CompilerGenerated]53	private sealed class _003C_003Ec__DisplayClass3_154	{55		public HashSet<string> existing;5657		public Func<string, bool> _003C_003E9__6;5859		internal bool _003CLockColumnsAsync_003Eb__6(string columnUid)60		{61			return !existing.Contains(columnUid);62		}63	}6465	[StructLayout((LayoutKind)3)]66	[CompilerGenerated]67	private struct _003CCheckAllowedAsync_003Ed__5 : IAsyncStateMachine68	{69		public int _003C_003E1__state;7071		public AsyncTaskMethodBuilder _003C_003Et__builder;7273		public ISession session;7475		public CancellationToken cancellationToken;7677		private ConfiguredTaskAwaiter<bool> _003C_003Eu__1;7879		private void MoveNext()80		{81			//IL_0054: Unknown result type (might be due to invalid IL or missing references)82			//IL_0059: Unknown result type (might be due to invalid IL or missing references)83			//IL_0060: Unknown result type (might be due to invalid IL or missing references)84			//IL_0011: Unknown result type (might be due to invalid IL or missing references)85			//IL_001c: Unknown result type (might be due to invalid IL or missing references)86			//IL_0021: Unknown result type (might be due to invalid IL or missing references)87			//IL_0024: Unknown result type (might be due to invalid IL or missing references)88			//IL_0029: Unknown result type (might be due to invalid IL or missing references)89			//IL_003d: Unknown result type (might be due to invalid IL or missing references)90			//IL_003e: Unknown result type (might be due to invalid IL or missing references)91			int num = _003C_003E1__state;92			try93			{94				ConfiguredTaskAwaiter<bool> val;95				if (num != 0)96				{97					val = IsAllowedAsync(session, cancellationToken).ConfigureAwait(false).GetAwaiter();98					if (!val.IsCompleted)99					{100						num = (_003C_003E1__state = 0);101						_003C_003Eu__1 = val;102						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003CCheckAllowedAsync_003Ed__5>(ref val, ref this);103						return;104					}105				}106				else107				{108					val = _003C_003Eu__1;109					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<bool>);110					num = (_003C_003E1__state = -1);111				}112				if (!val.GetResult())113				{114					throw new ViException(810455, ExceptionRelevance.EndUser);115				}116			}117			catch (System.Exception exception)118			{119				_003C_003E1__state = -2;120				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);121				return;122			}123			_003C_003E1__state = -2;124			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();125		}126127		[DebuggerHidden]128		private void SetStateMachine(IAsyncStateMachine stateMachine)129		{130			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);131		}132	}133134	[StructLayout((LayoutKind)3)]135	[CompilerGenerated]136	private struct _003CGetLockedColumnsAsync_003Ed__0 : IAsyncStateMachine137	{138		public int _003C_003E1__state;139140		public AsyncTaskMethodBuilder<string[]> _003C_003Et__builder;141142		public ISession session;143144		public DbObjectKey key;145146		public CancellationToken cancellationToken;147148		private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__1;149150		private void MoveNext()151		{152			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)153			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)154			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)155			//IL_001a: Unknown result type (might be due to invalid IL or missing references)156			//IL_0096: Unknown result type (might be due to invalid IL or missing references)157			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)158			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)159			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)160			//IL_00af: Unknown result type (might be due to invalid IL or missing references)161			//IL_0033: Unknown result type (might be due to invalid IL or missing references)162			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)163			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)164			int num = _003C_003E1__state;165			string[] result;166			try167			{168				ConfiguredTaskAwaiter<IEntityCollection> val;169				if (num != 0)170				{171					if (session == null)172					{173						throw new ArgumentNullException("session");174					}175					if (key == null)176					{177						throw new ArgumentNullException("key");178					}179					ISqlFormatter formatter = session.Resolve<ISqlFormatter>();180					Query query = Query.From("DialogColumn").Where(string.Format("UID_DialogColumn in (\tselect UID_DialogColumn from QBMLock where {0})", (object)formatter.UidComparison("ObjectKeyOfRow", key.ToXmlString()))).Select("Columnname");181					val = session.Source().GetCollectionAsync(query, cancellationToken).ConfigureAwait(false)182						.GetAwaiter();183					if (!val.IsCompleted)184					{185						num = (_003C_003E1__state = 0);186						_003C_003Eu__1 = val;187						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003CGetLockedColumnsAsync_003Ed__0>(ref val, ref this);188						return;189					}190				}191				else192				{193					val = _003C_003Eu__1;194					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IEntityCollection>);195					num = (_003C_003E1__state = -1);196				}197				result = Enumerable.ToArray<string>(Enumerable.Select<IEntity, string>((System.Collections.Generic.IEnumerable<IEntity>)val.GetResult(), (Func<IEntity, string>)((IEntity e) => e.GetValue<string>("Columnname"))));198			}199			catch (System.Exception exception)200			{201				_003C_003E1__state = -2;202				_003C_003Et__builder.SetException(exception);203				return;204			}205			_003C_003E1__state = -2;206			_003C_003Et__builder.SetResult(result);207		}208209		[DebuggerHidden]210		private void SetStateMachine(IAsyncStateMachine stateMachine)211		{212			_003C_003Et__builder.SetStateMachine(stateMachine);213		}214	}215216	[StructLayout((LayoutKind)3)]217	[CompilerGenerated]218	private struct _003CGetLockedColumnsAsync_003Ed__1 : IAsyncStateMachine219	{220		public int _003C_003E1__state;221222		public AsyncTaskMethodBuilder<string[]> _003C_003Et__builder;223224		public ISession session;225226		public IEntity entity;227228		public CancellationToken cancellationToken;229230		private ConfiguredTaskAwaiter<DbObjectKey> _003C_003Eu__1;231232		private ConfiguredTaskAwaiter<string[]> _003C_003Eu__2;233234		private void MoveNext()235		{236			//IL_0093: Unknown result type (might be due to invalid IL or missing references)237			//IL_0098: Unknown result type (might be due to invalid IL or missing references)238			//IL_009f: Unknown result type (might be due to invalid IL or missing references)239			//IL_00be: Unknown result type (might be due to invalid IL or missing references)240			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)241			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)242			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)243			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)244			//IL_0104: Unknown result type (might be due to invalid IL or missing references)245			//IL_0109: Unknown result type (might be due to invalid IL or missing references)246			//IL_0111: 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			//IL_0021: Unknown result type (might be due to invalid IL or missing references)250			//IL_004c: Unknown result type (might be due to invalid IL or missing references)251			//IL_0057: Unknown result type (might be due to invalid IL or missing references)252			//IL_005c: Unknown result type (might be due to invalid IL or missing references)253			//IL_0060: Unknown result type (might be due to invalid IL or missing references)254			//IL_0065: Unknown result type (might be due to invalid IL or missing references)255			//IL_0034: Unknown result type (might be due to invalid IL or missing references)256			//IL_0079: Unknown result type (might be due to invalid IL or missing references)257			//IL_007a: Unknown result type (might be due to invalid IL or missing references)258			int num = _003C_003E1__state;259			string[] result2;260			try261			{262				ConfiguredTaskAwaiter<string[]> val;263				ConfiguredTaskAwaiter<DbObjectKey> val2;264				if (num != 0)265				{266					if (num == 1)267					{268						val = _003C_003Eu__2;269						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string[]>);270						num = (_003C_003E1__state = -1);271						goto IL_0120;272					}273					if (session == null)274					{275						throw new ArgumentNullException("session");276					}277					if (entity == null)278					{279						throw new ArgumentNullException("entity");280					}281					val2 = DbObjectKey.CreateAsync(session.MetaData(), entity, cancellationToken).ConfigureAwait(false).GetAwaiter();282					if (!val2.IsCompleted)283					{284						num = (_003C_003E1__state = 0);285						_003C_003Eu__1 = val2;286						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbObjectKey>, _003CGetLockedColumnsAsync_003Ed__1>(ref val2, ref this);287						return;288					}289				}290				else291				{292					val2 = _003C_003Eu__1;293					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbObjectKey>);294					num = (_003C_003E1__state = -1);295				}296				DbObjectKey result = val2.GetResult();297				val = GetLockedColumnsAsync(session, result, cancellationToken).ConfigureAwait(false).GetAwaiter();298				if (!val.IsCompleted)299				{300					num = (_003C_003E1__state = 1);301					_003C_003Eu__2 = val;302					_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string[]>, _003CGetLockedColumnsAsync_003Ed__1>(ref val, ref this);303					return;304				}305				goto IL_0120;306				IL_0120:307				result2 = val.GetResult();308			}309			catch (System.Exception exception)310			{311				_003C_003E1__state = -2;312				_003C_003Et__builder.SetException(exception);313				return;314			}315			_003C_003E1__state = -2;316			_003C_003Et__builder.SetResult(result2);317		}318319		[DebuggerHidden]320		private void SetStateMachine(IAsyncStateMachine stateMachine)321		{322			_003C_003Et__builder.SetStateMachine(stateMachine);323		}324	}325326	[StructLayout((LayoutKind)3)]327	[CompilerGenerated]328	private struct _003CLockColumnsAsync_003Ed__2 : IAsyncStateMachine329	{330		public int _003C_003E1__state;331332		public AsyncTaskMethodBuilder _003C_003Et__builder;333334		public IUnitOfWork unitOfWork;335336		public IEntity entity;337338		public System.Collections.Generic.IEnumerable<string> columns;339340		public CancellationToken cancellationToken;341342		public EntityLockType type;343344		private string[] _003CcolumnsArray_003E5__2;345346		private ConfiguredTaskAwaiter<DbObjectKey> _003C_003Eu__1;347348		private ConfiguredTaskAwaiter<bool> _003C_003Eu__2;349350		private ConfiguredValueTaskAwaiter _003C_003Eu__3;351352		private void MoveNext()353		{354			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)355			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)356			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)357			//IL_012e: Unknown result type (might be due to invalid IL or missing references)358			//IL_0133: Unknown result type (might be due to invalid IL or missing references)359			//IL_013b: Unknown result type (might be due to invalid IL or missing references)360			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)361			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)362			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)363			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)364			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)365			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)366			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)367			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)368			//IL_0026: Unknown result type (might be due to invalid IL or missing references)369			//IL_0113: Unknown result type (might be due to invalid IL or missing references)370			//IL_0115: Unknown result type (might be due to invalid IL or missing references)371			//IL_0067: Unknown result type (might be due to invalid IL or missing references)372			//IL_0072: Unknown result type (might be due to invalid IL or missing references)373			//IL_0077: Unknown result type (might be due to invalid IL or missing references)374			//IL_007b: Unknown result type (might be due to invalid IL or missing references)375			//IL_0080: Unknown result type (might be due to invalid IL or missing references)376			//IL_0039: Unknown result type (might be due to invalid IL or missing references)377			//IL_0094: Unknown result type (might be due to invalid IL or missing references)378			//IL_0095: Unknown result type (might be due to invalid IL or missing references)379			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)380			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)381			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)382			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)383			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)384			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)385			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)386			int num = _003C_003E1__state;387			try388			{389				ConfiguredTaskAwaiter<DbObjectKey> val3;390				ConfiguredTaskAwaiter<bool> val2;391				ConfiguredValueTaskAwaiter val;392				bool result;393				DbObjectKey result2;394				switch (num)395				{396				default:397					if (unitOfWork == null)398					{399						throw new ArgumentNullException("unitOfWork");400					}401					if (entity == null)402					{403						throw new ArgumentNullException("entity");404					}405					_003CcolumnsArray_003E5__2 = columns.ToArraySmart();406					val3 = DbObjectKey.CreateAsync(unitOfWork.Session.MetaData(), entity, cancellationToken).ConfigureAwait(false).GetAwaiter();407					if (!val3.IsCompleted)408					{409						num = (_003C_003E1__state = 0);410						_003C_003Eu__1 = val3;411						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbObjectKey>, _003CLockColumnsAsync_003Ed__2>(ref val3, ref this);412						return;413					}414					goto IL_00c9;415				case 0:416					val3 = _003C_003Eu__1;417					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbObjectKey>);418					num = (_003C_003E1__state = -1);419					goto IL_00c9;420				case 1:421					val2 = _003C_003Eu__2;422					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<bool>);423					num = (_003C_003E1__state = -1);424					goto IL_014a;425				case 2:426					{427						val = _003C_003Eu__3;428						_003C_003Eu__3 = default(ConfiguredValueTaskAwaiter);429						num = (_003C_003E1__state = -1);430						break;431					}432					IL_014a:433					result = val2.GetResult();434					if (result)435					{436						entity.State |= EntityState.Locked;437					}438					else439					{440						entity.State &= ~EntityState.Locked;441					}442					if (entity.IsInteractive)443					{444						ConfiguredValueTaskAwaitable val4 = entity.CallMethodAsync("SetLockStateForDisplay", _003CcolumnsArray_003E5__2, result, cancellationToken).ConfigureAwait(false);445						val = ((ConfiguredValueTaskAwaitable)(ref val4)).GetAwaiter();446						if (!((ConfiguredValueTaskAwaiter)(ref val)).IsCompleted)447						{448							num = (_003C_003E1__state = 2);449							_003C_003Eu__3 = val;450							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter, _003CLockColumnsAsync_003Ed__2>(ref val, ref this);451							return;452						}453						break;454					}455					goto end_IL_0007;456					IL_00c9:457					result2 = val3.GetResult();458					val2 = LockColumnsAsync(unitOfWork, result2, _003CcolumnsArray_003E5__2, type, cancellationToken).ConfigureAwait(false).GetAwaiter();459					if (!val2.IsCompleted)460					{461						num = (_003C_003E1__state = 1);462						_003C_003Eu__2 = val2;463						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003CLockColumnsAsync_003Ed__2>(ref val2, ref this);464						return;465					}466					goto IL_014a;467				}468				((ConfiguredValueTaskAwaiter)(ref val)).GetResult();469				end_IL_0007:;470			}471			catch (System.Exception exception)472			{473				_003C_003E1__state = -2;474				_003CcolumnsArray_003E5__2 = null;475				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);476				return;477			}478			_003C_003E1__state = -2;479			_003CcolumnsArray_003E5__2 = null;480			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();481		}482483		[DebuggerHidden]484		private void SetStateMachine(IAsyncStateMachine stateMachine)485		{486			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);487		}488	}489490	[StructLayout((LayoutKind)3)]491	[CompilerGenerated]492	private struct _003CLockColumnsAsync_003Ed__3 : IAsyncStateMachine493	{494		public int _003C_003E1__state;495496		public AsyncTaskMethodBuilder<bool> _003C_003Et__builder;497498		public IUnitOfWork unitOfWork;499500		public DbObjectKey key;501502		public CancellationToken cancellationToken;503504		private _003C_003Ec__DisplayClass3_0 _003C_003E8__1;505506		public System.Collections.Generic.IEnumerable<string> columns;507508		public EntityLockType type;509510		private _003C_003Ec__DisplayClass3_1 _003C_003E8__2;511512		private IEntitySource _003Csource_003E5__2;513514		private bool _003Clocked_003E5__3;515516		private ConfiguredTaskAwaiter _003C_003Eu__1;517518		private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__2;519520		private ConfiguredTaskAwaiter<IEntityCollection> _003C_003Eu__3;521522		private System.Collections.Generic.IEnumerator<IEntity> _003C_003E7__wrap3;523524		private System.Collections.Generic.IEnumerator<string> _003C_003E7__wrap4;525526		private string _003CcolumnUid_003E5__6;527528		private IEntity _003Centry_003E5__7;529530		private ConfiguredTaskAwaiter<IEntity> _003C_003Eu__4;531532		private ConfiguredValueTaskAwaiter<ApplyResult> _003C_003Eu__5;533534		private ConfiguredTaskAwaiter<bool> _003C_003Eu__6;535536		private void MoveNext()537		{538			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)539			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)540			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)541			//IL_017a: Unknown result type (might be due to invalid IL or missing references)542			//IL_017f: Unknown result type (might be due to invalid IL or missing references)543			//IL_0187: Unknown result type (might be due to invalid IL or missing references)544			//IL_0298: Unknown result type (might be due to invalid IL or missing references)545			//IL_029d: Unknown result type (might be due to invalid IL or missing references)546			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)547			//IL_0459: Unknown result type (might be due to invalid IL or missing references)548			//IL_045e: Unknown result type (might be due to invalid IL or missing references)549			//IL_0466: Unknown result type (might be due to invalid IL or missing references)550			//IL_0809: Unknown result type (might be due to invalid IL or missing references)551			//IL_080e: Unknown result type (might be due to invalid IL or missing references)552			//IL_0816: Unknown result type (might be due to invalid IL or missing references)553			//IL_088d: Unknown result type (might be due to invalid IL or missing references)554			//IL_0892: Unknown result type (might be due to invalid IL or missing references)555			//IL_089a: Unknown result type (might be due to invalid IL or missing references)556			//IL_093f: Unknown result type (might be due to invalid IL or missing references)557			//IL_0944: Unknown result type (might be due to invalid IL or missing references)558			//IL_094b: Unknown result type (might be due to invalid IL or missing references)559			//IL_0131: Unknown result type (might be due to invalid IL or missing references)560			//IL_013c: Unknown result type (might be due to invalid IL or missing references)561			//IL_0141: Unknown result type (might be due to invalid IL or missing references)562			//IL_0145: Unknown result type (might be due to invalid IL or missing references)563			//IL_014a: Unknown result type (might be due to invalid IL or missing references)564			//IL_0055: Unknown result type (might be due to invalid IL or missing references)565			//IL_015f: Unknown result type (might be due to invalid IL or missing references)566			//IL_0161: Unknown result type (might be due to invalid IL or missing references)567			//IL_035c: Unknown result type (might be due to invalid IL or missing references)568			//IL_0361: Unknown result type (might be due to invalid IL or missing references)569			//IL_0368: Unknown result type (might be due to invalid IL or missing references)570			//IL_0589: Unknown result type (might be due to invalid IL or missing references)571			//IL_058e: Unknown result type (might be due to invalid IL or missing references)572			//IL_0596: Unknown result type (might be due to invalid IL or missing references)573			//IL_0615: Unknown result type (might be due to invalid IL or missing references)574			//IL_061a: Unknown result type (might be due to invalid IL or missing references)575			//IL_0622: Unknown result type (might be due to invalid IL or missing references)576			//IL_069d: Unknown result type (might be due to invalid IL or missing references)577			//IL_06a2: Unknown result type (might be due to invalid IL or missing references)578			//IL_06aa: Unknown result type (might be due to invalid IL or missing references)579			//IL_0715: Unknown result type (might be due to invalid IL or missing references)580			//IL_071a: Unknown result type (might be due to invalid IL or missing references)581			//IL_0721: Unknown result type (might be due to invalid IL or missing references)582			//IL_0843: Unknown result type (might be due to invalid IL or missing references)583			//IL_084e: Unknown result type (might be due to invalid IL or missing references)584			//IL_0853: Unknown result type (might be due to invalid IL or missing references)585			//IL_0857: Unknown result type (might be due to invalid IL or missing references)586			//IL_085c: Unknown result type (might be due to invalid IL or missing references)587			//IL_0080: Unknown result type (might be due to invalid IL or missing references)588			//IL_008b: Unknown result type (might be due to invalid IL or missing references)589			//IL_0090: Unknown result type (might be due to invalid IL or missing references)590			//IL_0094: Unknown result type (might be due to invalid IL or missing references)591			//IL_0099: Unknown result type (might be due to invalid IL or missing references)592			//IL_006e: Unknown result type (might be due to invalid IL or missing references)593			//IL_024f: Unknown result type (might be due to invalid IL or missing references)594			//IL_025a: Unknown result type (might be due to invalid IL or missing references)595			//IL_025f: Unknown result type (might be due to invalid IL or missing references)596			//IL_0263: Unknown result type (might be due to invalid IL or missing references)597			//IL_0268: Unknown result type (might be due to invalid IL or missing references)598			//IL_05c8: Unknown result type (might be due to invalid IL or missing references)599			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)600			//IL_05dc: Unknown result type (might be due to invalid IL or missing references)601			//IL_05e0: Unknown result type (might be due to invalid IL or missing references)602			//IL_05e5: Unknown result type (might be due to invalid IL or missing references)603			//IL_0650: Unknown result type (might be due to invalid IL or missing references)604			//IL_065f: Unknown result type (might be due to invalid IL or missing references)605			//IL_0664: Unknown result type (might be due to invalid IL or missing references)606			//IL_0668: Unknown result type (might be due to invalid IL or missing references)607			//IL_066d: Unknown result type (might be due to invalid IL or missing references)608			//IL_06ce: Unknown result type (might be due to invalid IL or missing references)609			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)610			//IL_06de: Unknown result type (might be due to invalid IL or missing references)611			//IL_06e2: Unknown result type (might be due to invalid IL or missing references)612			//IL_06e7: Unknown result type (might be due to invalid IL or missing references)613			//IL_0872: Unknown result type (might be due to invalid IL or missing references)614			//IL_0874: Unknown result type (might be due to invalid IL or missing references)615			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)616			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)617			//IL_027d: Unknown result type (might be due to invalid IL or missing references)618			//IL_027f: Unknown result type (might be due to invalid IL or missing references)619			//IL_0410: Unknown result type (might be due to invalid IL or missing references)620			//IL_041b: Unknown result type (might be due to invalid IL or missing references)621			//IL_0420: Unknown result type (might be due to invalid IL or missing references)622			//IL_0424: Unknown result type (might be due to invalid IL or missing references)623			//IL_0429: Unknown result type (might be due to invalid IL or missing references)624			//IL_0315: Unknown result type (might be due to invalid IL or missing references)625			//IL_0320: Unknown result type (might be due to invalid IL or missing references)626			//IL_0325: Unknown result type (might be due to invalid IL or missing references)627			//IL_0329: Unknown result type (might be due to invalid IL or missing references)628			//IL_032e: Unknown result type (might be due to invalid IL or missing references)629			//IL_05fa: Unknown result type (might be due to invalid IL or missing references)630			//IL_05fc: Unknown result type (might be due to invalid IL or missing references)631			//IL_0682: Unknown result type (might be due to invalid IL or missing references)632			//IL_0684: Unknown result type (might be due to invalid IL or missing references)633			//IL_06fb: Unknown result type (might be due to invalid IL or missing references)634			//IL_06fc: Unknown result type (might be due to invalid IL or missing references)635			//IL_0540: Unknown result type (might be due to invalid IL or missing references)636			//IL_054b: Unknown result type (might be due to invalid IL or missing references)637			//IL_0550: Unknown result type (might be due to invalid IL or missing references)638			//IL_0554: Unknown result type (might be due to invalid IL or missing references)639			//IL_0559: Unknown result type (might be due to invalid IL or missing references)640			//IL_08fa: Unknown result type (might be due to invalid IL or missing references)641			//IL_0905: Unknown result type (might be due to invalid IL or missing references)642			//IL_090a: Unknown result type (might be due to invalid IL or missing references)643			//IL_090e: Unknown result type (might be due to invalid IL or missing references)644			//IL_0913: Unknown result type (might be due to invalid IL or missing references)645			//IL_07bf: Unknown result type (might be due to invalid IL or missing references)646			//IL_07ca: Unknown result type (might be due to invalid IL or missing references)647			//IL_07cf: Unknown result type (might be due to invalid IL or missing references)648			//IL_07d3: Unknown result type (might be due to invalid IL or missing references)649			//IL_07d8: Unknown result type (might be due to invalid IL or missing references)650			//IL_043e: Unknown result type (might be due to invalid IL or missing references)651			//IL_0440: Unknown result type (might be due to invalid IL or missing references)652			//IL_0342: Unknown result type (might be due to invalid IL or missing references)653			//IL_0343: Unknown result type (might be due to invalid IL or missing references)654			//IL_056e: Unknown result type (might be due to invalid IL or missing references)655			//IL_0570: Unknown result type (might be due to invalid IL or missing references)656			//IL_0928: Unknown result type (might be due to invalid IL or missing references)657			//IL_0929: Unknown result type (might be due to invalid IL or missing references)658			//IL_07ee: Unknown result type (might be due to invalid IL or missing references)659			//IL_07f0: Unknown result type (might be due to invalid IL or missing references)660			int num = _003C_003E1__state;661			bool result7;662			try663			{664				ConfiguredTaskAwaitable val6;665				ConfiguredTaskAwaiter val;666				ConfiguredTaskAwaiter<IMetaTable> val5;667				ConfiguredTaskAwaiter<IEntityCollection> val4;668				ConfiguredTaskAwaiter<bool> val3;669				ConfiguredTaskAwaiter<IEntity> val2;670				IEntityCollection result;671				bool result2;672				IEntity result3;673				IMetaTable result4;674				IEntityCollection result6;675				switch (num)676				{677				default:678					_003C_003E8__1 = new _003C_003Ec__DisplayClass3_0();679					if (unitOfWork == null)680					{681						throw new ArgumentNullException("unitOfWork");682					}683					if (key == null)684					{685						throw new ArgumentNullException("key");686					}687					val6 = CheckAllowedAsync(unitOfWork.Session, cancellationToken).ConfigureAwait(false);688					val = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();689					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)690					{691						num = (_003C_003E1__state = 0);692						_003C_003Eu__1 = val;693						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CLockColumnsAsync_003Ed__3>(ref val, ref this);694						return;695					}696					goto IL_00e2;697				case 0:698					val = _003C_003Eu__1;699					_003C_003Eu__1 = default(ConfiguredTaskAwaiter);700					num = (_003C_003E1__state = -1);701					goto IL_00e2;702				case 1:703					val5 = _003C_003Eu__2;704					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<IMetaTable>);705					num = (_003C_003E1__state = -1);706					goto IL_0196;707				case 2:708					val4 = _003C_003Eu__3;709					_003C_003Eu__3 = default(ConfiguredTaskAwaiter<IEntityCollection>);710					num = (_003C_003E1__state = -1);711					goto IL_02b4;712				case 3:713					try714					{715						if (num != 3)716						{717							goto IL_037e;718						}719						val = _003C_003Eu__1;720						_003C_003Eu__1 = default(ConfiguredTaskAwaiter);721						num = (_003C_003E1__state = -1);722						goto IL_0377;723						IL_0377:724						((ConfiguredTaskAwaiter)(ref val)).GetResult();725						goto IL_037e;726						IL_037e:727						if (((System.Collections.IEnumerator)_003C_003E7__wrap3).MoveNext())728						{729							IEntity current = _003C_003E7__wrap3.Current;730							current.MarkForDeletion();731							val6 = unitOfWork.PutAsync(current, cancellationToken).ConfigureAwait(false);732							val = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();733							if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)734							{735								num = (_003C_003E1__state = 3);736								_003C_003Eu__1 = val;737								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CLockColumnsAsync_003Ed__3>(ref val, ref this);738								return;739							}740							goto IL_0377;741						}742					}743					finally744					{745						if (num < 0 && _003C_003E7__wrap3 != null)746						{747							((System.IDisposable)_003C_003E7__wrap3).Dispose();748						}749					}750					_003C_003E7__wrap3 = null;751					goto IL_03af;752				case 4:753					val4 = _003C_003Eu__3;754					_003C_003Eu__3 = default(ConfiguredTaskAwaiter<IEntityCollection>);755					num = (_003C_003E1__state = -1);756					goto IL_0475;757				case 5:758				case 6:759				case 7:760				case 8:761					try762					{763						ConfiguredValueTaskAwaiter<ApplyResult> val7;764						IEntity result5;765						switch (num)766						{767						case 5:768							val2 = _003C_003Eu__4;769							_003C_003Eu__4 = default(ConfiguredTaskAwaiter<IEntity>);770							num = (_003C_003E1__state = -1);771							goto IL_05a5;772						case 6:773							val7 = _003C_003Eu__5;774							_003C_003Eu__5 = default(ConfiguredValueTaskAwaiter<ApplyResult>);775							num = (_003C_003E1__state = -1);776							goto IL_0631;777						case 7:778							val7 = _003C_003Eu__5;779							_003C_003Eu__5 = default(ConfiguredValueTaskAwaiter<ApplyResult>);780							num = (_003C_003E1__state = -1);781							goto IL_06b9;782						case 8:783							val = _003C_003Eu__1;784							_003C_003Eu__1 = default(ConfiguredTaskAwaiter);785							num = (_003C_003E1__state = -1);786							goto IL_0730;787						default:788							{789								if (((System.Collections.IEnumerator)_003C_003E7__wrap4).MoveNext())790								{791									_003CcolumnUid_003E5__6 = _003C_003E7__wrap4.Current;792									val2 = _003Csource_003E5__2.CreateNewAsync("QBMLock", null, cancellationToken).ConfigureAwait(false).GetAwaiter();793									if (!val2.IsCompleted)794									{795										num = (_003C_003E1__state = 5);796										_003C_003Eu__4 = val2;797										_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CLockColumnsAsync_003Ed__3>(ref val2, ref this);798										return;799									}800									goto IL_05a5;801								}802								break;803							}804							IL_05a5:805							result5 = val2.GetResult();806							_003Centry_003E5__7 = result5;807							val7 = _003Centry_003E5__7.PutValueAsync("UID_DialogColumn", _003CcolumnUid_003E5__6, cancellationToken).ConfigureAwait(false).GetAwaiter();808							if (!val7.IsCompleted)809							{810								num = (_003C_003E1__state = 6);811								_003C_003Eu__5 = val7;812								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003CLockColumnsAsync_003Ed__3>(ref val7, ref this);813								return;814							}815							goto IL_0631;816							IL_0631:817							val7.GetResult();818							val7 = _003Centry_003E5__7.PutValueAsync("ObjectKeyOfRow", _003C_003E8__1.keyString, cancellationToken).ConfigureAwait(false).GetAwaiter();819							if (!val7.IsCompleted)820							{821								num = (_003C_003E1__state = 7);822								_003C_003Eu__5 = val7;823								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredValueTaskAwaiter<ApplyResult>, _003CLockColumnsAsync_003Ed__3>(ref val7, ref this);824								return;825							}826							goto IL_06b9;827							IL_0730:828							((ConfiguredTaskAwaiter)(ref val)).GetResult();829							_003Clocked_003E5__3 = true;830							_003Centry_003E5__7 = null;831							_003CcolumnUid_003E5__6 = null;832							goto default;833							IL_06b9:834							val7.GetResult();835							val6 = unitOfWork.PutAsync(_003Centry_003E5__7, cancellationToken).ConfigureAwait(false);836							val = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();837							if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)838							{839								num = (_003C_003E1__state = 8);840								_003C_003Eu__1 = val;841								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CLockColumnsAsync_003Ed__3>(ref val, ref this);842								return;843							}844							goto IL_0730;845						}846					}847					finally848					{849						if (num < 0 && _003C_003E7__wrap4 != null)850						{851							((System.IDisposable)_003C_003E7__wrap4).Dispose();852						}853					}854					_003C_003E7__wrap4 = null;855					_003C_003E8__2 = null;856					goto IL_0784;857				case 9:858					val3 = _003C_003Eu__6;859					_003C_003Eu__6 = default(ConfiguredTaskAwaiter<bool>);860					num = (_003C_003E1__state = -1);861					goto IL_0825;862				case 10:863					val2 = _003C_003Eu__4;864					_003C_003Eu__4 = default(ConfiguredTaskAwaiter<IEntity>);865					num = (_003C_003E1__state = -1);866					goto IL_08a9;867				case 11:868					{869						val = _003C_003Eu__1;870						_003C_003Eu__1 = default(ConfiguredTaskAwaiter);871						num = (_003C_003E1__state = -1);872						goto IL_095a;873					}874					IL_095a:875					((ConfiguredTaskAwaiter)(ref val)).GetResult();876					break;877					IL_02b4:878					result = val4.GetResult();879					_003C_003E7__wrap3 = Enumerable.Where<IEntity>((System.Collections.Generic.IEnumerable<IEntity>)result, (Func<IEntity, bool>)((IEntity e) => !e.IsDeleted())).GetEnumerator();880					goto case 3;881					IL_0825:882					result2 = val3.GetResult();883					_003Clocked_003E5__3 = result2;884					goto IL_0836;885					IL_0784:886					if (!_003Clocked_003E5__3)887					{888						Query query = (from t in Query.From("QBMLock")889							where t.Column("ObjectKeyOfRow") == _003C_003E8__1.keyString890							select t).SelectDisplays();891						val3 = _003Csource_003E5__2.ExistsAsync(query, cancellationToken).ConfigureAwait(false).GetAwaiter();892						if (!val3.IsCompleted)893						{894							num = (_003C_003E1__state = 9);895							_003C_003Eu__6 = val3;896							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<bool>, _003CLockColumnsAsync_003Ed__3>(ref val3, ref this);897							return;898						}899						goto IL_0825;900					}901					goto IL_0836;902					IL_00e2:903					((ConfiguredTaskAwaiter)(ref val)).GetResult();904					_003Csource_003E5__2 = unitOfWork.Session.Source();905					_003C_003E8__1.keyString = key.ToXmlString();906					val5 = unitOfWork.Session.MetaData().GetTableAsync(key.Tablename, cancellationToken).ConfigureAwait(false)907						.GetAwaiter();908					if (!val5.IsCompleted)909					{910						num = (_003C_003E1__state = 1);911						_003C_003Eu__2 = val5;912						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003CLockColumnsAsync_003Ed__3>(ref val5, ref this);913						return;914					}915					goto IL_0196;916					IL_08a9:917					result3 = val2.GetResult();918					if (!(_003Clocked_003E5__3 ^ result3.State.HasFlagFast(EntityState.Locked)))919					{920						break;921					}922					if (_003Clocked_003E5__3)923					{924						result3.State |= EntityState.Locked;925					}926					else927					{928						result3.State &= ~EntityState.Locked;929					}930					val6 = unitOfWork.PutAsync(result3, cancellationToken).ConfigureAwait(false);931					val = ((ConfiguredTaskAwaitable)(ref val6)).GetAwaiter();932					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)933					{934						num = (_003C_003E1__state = 11);935						_003C_003Eu__1 = val;936						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CLockColumnsAsync_003Ed__3>(ref val, ref this);937						return;938					}939					goto IL_095a;940					IL_0196:941					result4 = val5.GetResult();942					_003C_003E8__1.table = result4;943					_003C_003E8__1.columnUids = Enumerable.ToArray<string>(Enumerable.Select<string, string>(columns.AvoidNull(), (Func<string, string>)((string c) => _003C_003E8__1.table.Columns[c].Uid)));944					if (type == EntityLockType.Replace || type == EntityLockType.Remove)945					{946						Query query2 = (from t in Query.From("QBMLock")947							where t.Column("ObjectKeyOfRow") == _003C_003E8__1.keyString948							select t).SelectDisplays();949						if (type == EntityLockType.Remove)950						{951							query2 = query2.Where((IExpressionContext t) => t.Column("UID_DialogColumn").In(_003C_003E8__1.columnUids)).GetQuery();952						}953						val4 = _003Csource_003E5__2.GetCollectionAsync(query2, EntityCollectionLoadType.Bulk, cancellationToken).ConfigureAwait(false).GetAwaiter();954						if (!val4.IsCompleted)955						{956							num = (_003C_003E1__state = 2);957							_003C_003Eu__3 = val4;958							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003CLockColumnsAsync_003Ed__3>(ref val4, ref this);959							return;960						}961						goto IL_02b4;962					}963					goto IL_03af;964					IL_03af:965					_003Clocked_003E5__3 = false;966					if (type != EntityLockType.Remove)967					{968						_003C_003E8__2 = new _003C_003Ec__DisplayClass3_1();969						Query query3 = (from t in Query.From("QBMLock")970							where t.Column("ObjectKeyOfRow") == _003C_003E8__1.keyString && t.Column("UID_DialogColumn").In(_003C_003E8__1.columnUids)971							select t).Select("UID_DialogColumn");972						val4 = _003Csource_003E5__2.GetCollectionAsync(query3, EntityCollectionLoadType.Slim, cancellationToken).ConfigureAwait(false).GetAwaiter();973						if (!val4.IsCompleted)974						{975							num = (_003C_003E1__state = 4);976							_003C_003Eu__3 = val4;977							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntityCollection>, _003CLockColumnsAsync_003Ed__3>(ref val4, ref this);978							return;979						}980						goto IL_0475;981					}982					goto IL_0784;983					IL_0475:984					result6 = val4.GetResult();985					_003C_003E8__2.existing = Enumerable.ToHashSet<string>(Enumerable.Select<IEntity, string>((System.Collections.Generic.IEnumerable<IEntity>)result6, (Func<IEntity, string>)((IEntity e) => e.GetValue<string>("UID_DialogColumn"))), (IEqualityComparer<string>)(object)StringComparer.Ordinal);986					_003C_003E7__wrap4 = Enumerable.Where<string>((System.Collections.Generic.IEnumerable<string>)_003C_003E8__1.columnUids, (Func<string, bool>)((string columnUid) => !_003C_003E8__2.existing.Contains(columnUid))).GetEnumerator();987					goto case 5;988					IL_0836:989					val2 = _003Csource_003E5__2.GetAsync(key, cancellationToken).ConfigureAwait(false).GetAwaiter();990					if (!val2.IsCompleted)991					{992						num = (_003C_003E1__state = 10);993						_003C_003Eu__4 = val2;994						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IEntity>, _003CLockColumnsAsync_003Ed__3>(ref val2, ref this);995						return;996					}997					goto IL_08a9;998				}999				result7 = _003Clocked_003E5__3;1000			}1001			catch (System.Exception exception)1002			{1003				_003C_003E1__state = -2;1004				_003C_003E8__1 = null;1005				_003Csource_003E5__2 = null;1006				_003C_003Et__builder.SetException(exception);1007				return;1008			}1009			_003C_003E1__state = -2;1010			_003C_003E8__1 = null;1011			_003Csource_003E5__2 = null;1012			_003C_003Et__builder.SetResult(result7);1013		}10141015		[DebuggerHidden]1016		private void SetStateMachine(IAsyncStateMachine stateMachine)1017		{1018			_003C_003Et__builder.SetStateMachine(stateMachine);1019		}1020	}10211022	[AsyncStateMachine(typeof(_003CGetLockedColumnsAsync_003Ed__0))]1023	public static async System.Threading.Tasks.Task<string[]> GetLockedColumnsAsync(ISession session, DbObjectKey key, CancellationToken cancellationToken = default(CancellationToken))1024	{1025		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1026		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1027		//IL_001e: Unknown result type (might be due to invalid IL or missing references)1028		//IL_001f: Unknown result type (might be due to invalid IL or missing references)1029		if (session == null)1030		{1031			throw new ArgumentNullException("session");1032		}1033		if (key == null)1034		{1035			throw new ArgumentNullException("key");1036		}1037		ISqlFormatter formatter = session.Resolve<ISqlFormatter>();1038		Query query = Query.From("DialogColumn").Where(string.Format("UID_DialogColumn in (\tselect UID_DialogColumn from QBMLock where {0})", (object)formatter.UidComparison("ObjectKeyOfRow", key.ToXmlString()))).Select("Columnname");1039		return Enumerable.ToArray<string>(Enumerable.Select<IEntity, string>((System.Collections.Generic.IEnumerable<IEntity>)(await session.Source().GetCollectionAsync(query, cancellationToken).ConfigureAwait(false)), (Func<IEntity, string>)((IEntity e) => e.GetValue<string>("Columnname"))));1040	}10411042	[AsyncStateMachine(typeof(_003CGetLockedColumnsAsync_003Ed__1))]1043	public static async System.Threading.Tasks.Task<string[]> GetLockedColumnsAsync(ISession session, IEntity entity, CancellationToken cancellationToken = default(CancellationToken))1044	{1045		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1046		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1047		//IL_001e: Unknown result type (might be due to invalid IL or missing references)1048		//IL_001f: Unknown result type (might be due to invalid IL or missing references)1049		if (session == null)1050		{1051			throw new ArgumentNullException("session");1052		}1053		if (entity == null)1054		{1055			throw new ArgumentNullException("entity");1056		}1057		return await GetLockedColumnsAsync(session, await DbObjectKey.CreateAsync(session.MetaData(), entity, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);1058	}10591060	[AsyncStateMachine(typeof(_003CLockColumnsAsync_003Ed__2))]1061	public static System.Threading.Tasks.Task LockColumnsAsync(IUnitOfWork unitOfWork, IEntity entity, System.Collections.Generic.IEnumerable<string> columns, EntityLockType type, CancellationToken cancellationToken = default(CancellationToken))1062	{1063		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1064		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1065		//IL_002e: Unknown result type (might be due to invalid IL or missing references)1066		//IL_0030: Unknown result type (might be due to invalid IL or missing references)1067		_003CLockColumnsAsync_003Ed__2 _003CLockColumnsAsync_003Ed__ = default(_003CLockColumnsAsync_003Ed__2);1068		_003CLockColumnsAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1069		_003CLockColumnsAsync_003Ed__.unitOfWork = unitOfWork;1070		_003CLockColumnsAsync_003Ed__.entity = entity;1071		_003CLockColumnsAsync_003Ed__.columns = columns;1072		_003CLockColumnsAsync_003Ed__.type = type;1073		_003CLockColumnsAsync_003Ed__.cancellationToken = cancellationToken;1074		_003CLockColumnsAsync_003Ed__._003C_003E1__state = -1;1075		((AsyncTaskMethodBuilder)(ref _003CLockColumnsAsync_003Ed__._003C_003Et__builder)).Start<_003CLockColumnsAsync_003Ed__2>(ref _003CLockColumnsAsync_003Ed__);1076		return ((AsyncTaskMethodBuilder)(ref _003CLockColumnsAsync_003Ed__._003C_003Et__builder)).Task;1077	}10781079	[AsyncStateMachine(typeof(_003CLockColumnsAsync_003Ed__3))]1080	public static async System.Threading.Tasks.Task<bool> LockColumnsAsync(IUnitOfWork unitOfWork, DbObjectKey key, System.Collections.Generic.IEnumerable<string> columns, EntityLockType type, CancellationToken cancellationToken = default(CancellationToken))1081	{1082		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1083		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1084		//IL_002e: Unknown result type (might be due to invalid IL or missing references)1085		//IL_0030: Unknown result type (might be due to invalid IL or missing references)1086		if (unitOfWork == null)1087		{1088			throw new ArgumentNullException("unitOfWork");1089		}1090		if (key == null)1091		{1092			throw new ArgumentNullException("key");1093		}1094		await CheckAllowedAsync(unitOfWork.Session, cancellationToken).ConfigureAwait(false);1095		IEntitySource source = unitOfWork.Session.Source();1096		string keyString = key.ToXmlString();1097		IMetaTable table = await unitOfWork.Session.MetaData().GetTableAsync(key.Tablename, cancellationToken).ConfigureAwait(false);1098		string[] columnUids = Enumerable.ToArray<string>(Enumerable.Select<string, string>(columns.AvoidNull(), (Func<string, string>)((string c) => table.Columns[c].Uid)));1099		if (type == EntityLockType.Replace || type == EntityLockType.Remove)1100		{1101			Query query = (from t in Query.From("QBMLock")1102				where t.Column("ObjectKeyOfRow") == keyString1103				select t).SelectDisplays();1104			if (type == EntityLockType.Remove)1105			{1106				query = query.Where((IExpressionContext t) => t.Column("UID_DialogColumn").In(columnUids)).GetQuery();1107			}1108			System.Collections.Generic.IEnumerator<IEntity> enumerator = Enumerable.Where<IEntity>((System.Collections.Generic.IEnumerable<IEntity>)(await source.GetCollectionAsync(query, EntityCollectionLoadType.Bulk, cancellationToken).ConfigureAwait(false)), (Func<IEntity, bool>)((IEntity e) => !e.IsDeleted())).GetEnumerator();1109			try1110			{1111				while (((System.Collections.IEnumerator)enumerator).MoveNext())1112				{1113					IEntity current = enumerator.Current;1114					current.MarkForDeletion();1115					await unitOfWork.PutAsync(current, cancellationToken).ConfigureAwait(false);1116				}1117			}1118			finally1119			{1120				((System.IDisposable)enumerator)?.Dispose();1121			}1122		}1123		bool locked = false;1124		if (type != EntityLockType.Remove)1125		{1126			Query query2 = (from t in Query.From("QBMLock")1127				where t.Column("ObjectKeyOfRow") == keyString && t.Column("UID_DialogColumn").In(columnUids)1128				select t).Select("UID_DialogColumn");1129			HashSet<string> existing = Enumerable.ToHashSet<string>(Enumerable.Select<IEntity, string>((System.Collections.Generic.IEnumerable<IEntity>)(await source.GetCollectionAsync(query2, EntityCollectionLoadType.Slim, cancellationToken).ConfigureAwait(false)), (Func<IEntity, string>)((IEntity e) => e.GetValue<string>("UID_DialogColumn"))), (IEqualityComparer<string>)(object)StringComparer.Ordinal);1130			System.Collections.Generic.IEnumerator<string> enumerator2 = Enumerable.Where<string>((System.Collections.Generic.IEnumerable<string>)columnUids, (Func<string, bool>)((string text) => !existing.Contains(text))).GetEnumerator();1131			try1132			{1133				while (((System.Collections.IEnumerator)enumerator2).MoveNext())1134				{1135					string columnUid = enumerator2.Current;1136					IEntity entry = await source.CreateNewAsync("QBMLock", null, cancellationToken).ConfigureAwait(false);1137					await entry.PutValueAsync("UID_DialogColumn", columnUid, cancellationToken).ConfigureAwait(false);1138					await entry.PutValueAsync("ObjectKeyOfRow", keyString, cancellationToken).ConfigureAwait(false);1139					await unitOfWork.PutAsync(entry, cancellationToken).ConfigureAwait(false);1140					locked = true;1141				}1142			}1143			finally1144			{1145				((System.IDisposable)enumerator2)?.Dispose();1146			}1147		}1148		if (!locked)1149		{1150			Query query3 = (from t in Query.From("QBMLock")1151				where t.Column("ObjectKeyOfRow") == keyString1152				select t).SelectDisplays();1153			locked = await source.ExistsAsync(query3, cancellationToken).ConfigureAwait(false);1154		}1155		IEntity entity = await source.GetAsync(key, cancellationToken).ConfigureAwait(false);1156		if (locked ^ entity.State.HasFlagFast(EntityState.Locked))1157		{1158			if (locked)1159			{1160				entity.State |= EntityState.Locked;1161			}1162			else1163			{1164				entity.State &= ~EntityState.Locked;1165			}1166			await unitOfWork.PutAsync(entity, cancellationToken).ConfigureAwait(false);1167		}1168		return locked;1169	}11701171	public static System.Threading.Tasks.Task<bool> IsAllowedAsync(ISession session, CancellationToken cancellationToken = default(CancellationToken))1172	{1173		//IL_0010: Unknown result type (might be due to invalid IL or missing references)1174		return session.Principal.Features.IsAllowedAsync("Common_AllowPropertyLocks", cancellationToken);1175	}11761177	[AsyncStateMachine(typeof(_003CCheckAllowedAsync_003Ed__5))]1178	internal static System.Threading.Tasks.Task CheckAllowedAsync(ISession session, CancellationToken cancellationToken)1179	{1180		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1181		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1182		//IL_0016: Unknown result type (might be due to invalid IL or missing references)1183		//IL_0017: Unknown result type (might be due to invalid IL or missing references)1184		_003CCheckAllowedAsync_003Ed__5 _003CCheckAllowedAsync_003Ed__ = default(_003CCheckAllowedAsync_003Ed__5);1185		_003CCheckAllowedAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1186		_003CCheckAllowedAsync_003Ed__.session = session;1187		_003CCheckAllowedAsync_003Ed__.cancellationToken = cancellationToken;1188		_003CCheckAllowedAsync_003Ed__._003C_003E1__state = -1;1189		((AsyncTaskMethodBuilder)(ref _003CCheckAllowedAsync_003Ed__._003C_003Et__builder)).Start<_003CCheckAllowedAsync_003Ed__5>(ref _003CCheckAllowedAsync_003Ed__);1190		return ((AsyncTaskMethodBuilder)(ref _003CCheckAllowedAsync_003Ed__._003C_003Et__builder)).Task;1191	}1192}1193