Back to OIM Explorer

Common.Customizer/VI.Common.Customizer/PwdPolicyColumnEntityLogic.cs

Decompiler Source FileCommon.Customizer.PwdPolicyColumnEntityLogicDecompiled Source

1 extracted method/event/call references in PwdPolicyColumnEntityLogic.

Source: F:\Claude\.tmp\oim-decompiled-full\0045_One_Identity_Manager_Common.Customizer.dll\VI.Common.Customizer\PwdPolicyColumnEntityLogic.cs

Source size: 56.798 characters

Interpretation

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

Relations

  • Function registration: GetPwdPolicyUid at line 1061

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.

None extracted.

Summary: classes PwdPolicyColumnEntityLogic, _003C_003Ec__DisplayClass2_0; methods MoveNext, SetStateMachine, _003COnInitializeAsync_003Eb__0, _003COnInitializeAsync_003Eb__1, OnInitializeAsync, OnSavingAsync

Classes

PwdPolicyColumnEntityLogic _003C_003Ec__DisplayClass2_0

DB/Dialog object references

None extracted.

OIM key/entity markers

None extracted.

API/entity calls

IsFullSync IsDeleted MetaData Create

Registrations / handlers

None extracted.

Complete Source

C#1.249 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.Security;9using System.Threading;10using System.Threading.Tasks;11using NLog;12using VI.Base;13using VI.Base.Encryption;14using VI.DB;15using VI.DB.Entities;16using VI.DB.MetaData;17using VI.DB.Passwords;1819namespace VI.Common.Customizer;2021public class PwdPolicyColumnEntityLogic : StateBasedEntityLogic22{23	[CompilerGenerated]24	private sealed class _003C_003Ec__DisplayClass2_025	{26		[StructLayout((LayoutKind)3)]27		private struct _003C_003COnInitializeAsync_003Eb__0_003Ed : IAsyncStateMachine28		{29			public int _003C_003E1__state;3031			public AsyncTaskMethodBuilder<string> _003C_003Et__builder;3233			public IEntity e;3435			public string val;3637			public _003C_003Ec__DisplayClass2_0 _003C_003E4__this;3839			public ISession s;4041			public CancellationToken ct;4243			private ConfiguredTaskAwaiter _003C_003Eu__1;4445			private void MoveNext()46			{47				//IL_0186: Unknown result type (might be due to invalid IL or missing references)48				//IL_018b: Unknown result type (might be due to invalid IL or missing references)49				//IL_0192: Unknown result type (might be due to invalid IL or missing references)50				//IL_0142: Unknown result type (might be due to invalid IL or missing references)51				//IL_014d: Unknown result type (might be due to invalid IL or missing references)52				//IL_0152: Unknown result type (might be due to invalid IL or missing references)53				//IL_0156: Unknown result type (might be due to invalid IL or missing references)54				//IL_015b: Unknown result type (might be due to invalid IL or missing references)55				//IL_016f: Unknown result type (might be due to invalid IL or missing references)56				//IL_0170: Unknown result type (might be due to invalid IL or missing references)57				int num = _003C_003E1__state;58				_003C_003Ec__DisplayClass2_0 _003C_003Ec__DisplayClass2_ = _003C_003E4__this;59				string result;60				try61				{62					ConfiguredTaskAwaiter val;63					if (num == 0)64					{65						val = _003C_003Eu__1;66						_003C_003Eu__1 = default(ConfiguredTaskAwaiter);67						num = (_003C_003E1__state = -1);68						goto IL_01a1;69					}70					if (!e.State.HasFlagFast(EntityState.Discard) && !HashFunction.IsHashed(this.val) && (!_003C_003Ec__DisplayClass2_.ptColumn.Column.IsCrypted || !PwdStore.IsEncrypted(this.val)) && (!s.IsFullSync() || !string.IsNullOrEmpty(this.val) || !string.IsNullOrEmpty(e.Columns[_003C_003Ec__DisplayClass2_.ptColumn.Column.Columnname].GetOldValue<string>())))71					{72						_003C_003Ec__DisplayClass2_._003C_003E4__this._pwdStore[_003C_003Ec__DisplayClass2_.ptColumn.Column.Columnname].Password = this.val.ToSecure();73						_003C_003Ec__DisplayClass2_._003C_003E4__this._pwdStore[_003C_003Ec__DisplayClass2_.ptColumn.Column.Columnname].IsChecked = false;74						ConfiguredTaskAwaitable val2 = _003C_003Ec__DisplayClass2_._003C_003E4__this._CheckPasswordAsync(s, e, _003C_003Ec__DisplayClass2_.ptColumn.Column.Columnname, ct).ConfigureAwait(false);75						val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();76						if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)77						{78							num = (_003C_003E1__state = 0);79							_003C_003Eu__1 = val;80							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_003COnInitializeAsync_003Eb__0_003Ed>(ref val, ref this);81							return;82						}83						goto IL_01a1;84					}85					_003C_003Ec__DisplayClass2_._003C_003E4__this._pwdStore.Remove(_003C_003Ec__DisplayClass2_.ptColumn.Column.Columnname);86					result = this.val;87					goto end_IL_000e;88					IL_01a1:89					((ConfiguredTaskAwaiter)(ref val)).GetResult();90					result = this.val;91					end_IL_000e:;92				}93				catch (System.Exception exception)94				{95					_003C_003E1__state = -2;96					_003C_003Et__builder.SetException(exception);97					return;98				}99				_003C_003E1__state = -2;100				_003C_003Et__builder.SetResult(result);101			}102103			[DebuggerHidden]104			private void SetStateMachine(IAsyncStateMachine stateMachine)105			{106				_003C_003Et__builder.SetStateMachine(stateMachine);107			}108		}109110		public PolicyColumnInfo ptColumn;111112		public PwdPolicyColumnEntityLogic _003C_003E4__this;113114		public Func<string, string> _003C_003E9__1;115116		[AsyncStateMachine(typeof(_003C_003COnInitializeAsync_003Eb__0_003Ed))]117		internal async System.Threading.Tasks.Task<string> _003COnInitializeAsync_003Eb__0(ISession s, IEntity e, string val, CancellationToken ct)118		{119			//IL_0002: Unknown result type (might be due to invalid IL or missing references)120			//IL_0007: Unknown result type (might be due to invalid IL or missing references)121			//IL_002e: Unknown result type (might be due to invalid IL or missing references)122			//IL_0030: Unknown result type (might be due to invalid IL or missing references)123			if (e.State.HasFlagFast(EntityState.Discard) || HashFunction.IsHashed(val) || (ptColumn.Column.IsCrypted && PwdStore.IsEncrypted(val)) || (s.IsFullSync() && string.IsNullOrEmpty(val) && string.IsNullOrEmpty(e.Columns[ptColumn.Column.Columnname].GetOldValue<string>())))124			{125				_003C_003E4__this._pwdStore.Remove(ptColumn.Column.Columnname);126				return val;127			}128			_003C_003E4__this._pwdStore[ptColumn.Column.Columnname].Password = val.ToSecure();129			_003C_003E4__this._pwdStore[ptColumn.Column.Columnname].IsChecked = false;130			await _003C_003E4__this._CheckPasswordAsync(s, e, ptColumn.Column.Columnname, ct).ConfigureAwait(false);131			return val;132		}133134		internal string _003COnInitializeAsync_003Eb__1(string val)135		{136			_003C_003E4__this._pwdStore[ptColumn.Column.Columnname].IsChecked = false;137			return val;138		}139	}140141	[StructLayout((LayoutKind)3)]142	[CompilerGenerated]143	private struct _003COnInitializeAsync_003Ed__2 : IAsyncStateMachine144	{145		public int _003C_003E1__state;146147		public AsyncTaskMethodBuilder<Diff> _003C_003Et__builder;148149		public LogicReadOnlyParameters parameters;150151		public IEntity entity;152153		public CancellationToken cancellationToken;154155		public PwdPolicyColumnEntityLogic _003C_003E4__this;156157		private ConfiguredTaskAwaiter<PolicyTableInfo> _003C_003Eu__1;158159		private ConfiguredTaskAwaiter<Diff> _003C_003Eu__2;160161		private void MoveNext()162		{163			//IL_009d: Unknown result type (might be due to invalid IL or missing references)164			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)165			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)166			//IL_022f: Unknown result type (might be due to invalid IL or missing references)167			//IL_0234: Unknown result type (might be due to invalid IL or missing references)168			//IL_023c: Unknown result type (might be due to invalid IL or missing references)169			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)170			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)171			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)172			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)173			//IL_0202: Unknown result type (might be due to invalid IL or missing references)174			//IL_0217: Unknown result type (might be due to invalid IL or missing references)175			//IL_0219: Unknown result type (might be due to invalid IL or missing references)176			//IL_0054: Unknown result type (might be due to invalid IL or missing references)177			//IL_005f: Unknown result type (might be due to invalid IL or missing references)178			//IL_0064: Unknown result type (might be due to invalid IL or missing references)179			//IL_0068: Unknown result type (might be due to invalid IL or missing references)180			//IL_006d: Unknown result type (might be due to invalid IL or missing references)181			//IL_0082: Unknown result type (might be due to invalid IL or missing references)182			//IL_0084: Unknown result type (might be due to invalid IL or missing references)183			int num = _003C_003E1__state;184			PwdPolicyColumnEntityLogic pwdPolicyColumnEntityLogic = _003C_003E4__this;185			Diff result;186			try187			{188				ConfiguredTaskAwaiter<PolicyTableInfo> val;189				ConfiguredTaskAwaiter<Diff> val2;190				if (num != 0)191				{192					if (num != 1)193					{194						if (!parameters.Session.IsFullSync())195						{196							IPasswordManager passwordManager = parameters.Session.Resolve<IPasswordManager>();197							if (passwordManager != null)198							{199								val = passwordManager.GetPolicyColumnsForTableAsync(entity.Tablename, cancellationToken).ConfigureAwait(false).GetAwaiter();200								if (!val.IsCompleted)201								{202									num = (_003C_003E1__state = 0);203									_003C_003Eu__1 = val;204									_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<PolicyTableInfo>, _003COnInitializeAsync_003Ed__2>(ref val, ref this);205									return;206								}207								goto IL_00b9;208							}209						}210						goto IL_01db;211					}212					val2 = _003C_003Eu__2;213					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<Diff>);214					num = (_003C_003E1__state = -1);215					goto IL_024b;216				}217				val = _003C_003Eu__1;218				_003C_003Eu__1 = default(ConfiguredTaskAwaiter<PolicyTableInfo>);219				num = (_003C_003E1__state = -1);220				goto IL_00b9;221				IL_024b:222				result = val2.GetResult();223				goto end_IL_000e;224				IL_01db:225				val2 = ((StateLessEntityLogic)pwdPolicyColumnEntityLogic).OnInitializeAsync(entity, parameters, cancellationToken).ConfigureAwait(false).GetAwaiter();226				if (!val2.IsCompleted)227				{228					num = (_003C_003E1__state = 1);229					_003C_003Eu__2 = val2;230					_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<Diff>, _003COnInitializeAsync_003Ed__2>(ref val2, ref this);231					return;232				}233				goto IL_024b;234				IL_00b9:235				PolicyTableInfo result2 = val.GetResult();236				if (result2 != null)237				{238					pwdPolicyColumnEntityLogic._pwdStore = new PwdStore();239					System.Collections.Generic.IEnumerator<PolicyColumnInfo> enumerator = result2.Columns.GetEnumerator();240					try241					{242						while (((System.Collections.IEnumerator)enumerator).MoveNext())243						{244							_003C_003Ec__DisplayClass2_0 CS_0024_003C_003E8__locals14 = new _003C_003Ec__DisplayClass2_0245							{246								_003C_003E4__this = pwdPolicyColumnEntityLogic,247								ptColumn = enumerator.Current248							};249							pwdPolicyColumnEntityLogic.Format(CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname).AsExpensive<string, string>((Func<ISession, IEntity, string, CancellationToken, System.Threading.Tasks.Task<string>>)([AsyncStateMachine(typeof(_003C_003Ec__DisplayClass2_0._003C_003COnInitializeAsync_003Eb__0_003Ed))] async (ISession s, IEntity e, string text, CancellationToken ct) =>250							{251								//IL_0002: Unknown result type (might be due to invalid IL or missing references)252								//IL_0007: Unknown result type (might be due to invalid IL or missing references)253								//IL_002e: Unknown result type (might be due to invalid IL or missing references)254								//IL_0030: Unknown result type (might be due to invalid IL or missing references)255								if (e.State.HasFlagFast(EntityState.Discard) || HashFunction.IsHashed(text) || (CS_0024_003C_003E8__locals14.ptColumn.Column.IsCrypted && PwdStore.IsEncrypted(text)) || (s.IsFullSync() && string.IsNullOrEmpty(text) && string.IsNullOrEmpty(e.Columns[CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname].GetOldValue<string>())))256								{257									CS_0024_003C_003E8__locals14._003C_003E4__this._pwdStore.Remove(CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname);258									return text;259								}260								CS_0024_003C_003E8__locals14._003C_003E4__this._pwdStore[CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname].Password = text.ToSecure();261								CS_0024_003C_003E8__locals14._003C_003E4__this._pwdStore[CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname].IsChecked = false;262								await CS_0024_003C_003E8__locals14._003C_003E4__this._CheckPasswordAsync(s, e, CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname, ct).ConfigureAwait(false);263								return text;264							}));265							System.Collections.Generic.IEnumerator<PolicyReferenceInfo> enumerator2 = CS_0024_003C_003E8__locals14.ptColumn.References.GetEnumerator();266							try267							{268								while (((System.Collections.IEnumerator)enumerator2).MoveNext())269								{270									IMetaColumn metaColumn = Enumerable.FirstOrDefault<IMetaColumn>((System.Collections.Generic.IEnumerable<IMetaColumn>)enumerator2.Current.ScopeReferenceColumns);271									if (metaColumn != null)272									{273										pwdPolicyColumnEntityLogic.Format(metaColumn.Columnname).As<string, string>(delegate(string result3)274										{275											CS_0024_003C_003E8__locals14._003C_003E4__this._pwdStore[CS_0024_003C_003E8__locals14.ptColumn.Column.Columnname].IsChecked = false;276											return result3;277										});278									}279								}280							}281							finally282							{283								if (num < 0)284								{285									((System.IDisposable)enumerator2)?.Dispose();286								}287							}288						}289					}290					finally291					{292						if (num < 0)293						{294							((System.IDisposable)enumerator)?.Dispose();295						}296					}297				}298				goto IL_01db;299				end_IL_000e:;300			}301			catch (System.Exception exception)302			{303				_003C_003E1__state = -2;304				_003C_003Et__builder.SetException(exception);305				return;306			}307			_003C_003E1__state = -2;308			_003C_003Et__builder.SetResult(result);309		}310311		[DebuggerHidden]312		private void SetStateMachine(IAsyncStateMachine stateMachine)313		{314			_003C_003Et__builder.SetStateMachine(stateMachine);315		}316	}317318	[StructLayout((LayoutKind)3)]319	[CompilerGenerated]320	private struct _003COnSavedAsync_003Ed__4 : IAsyncStateMachine321	{322		public int _003C_003E1__state;323324		public AsyncTaskMethodBuilder _003C_003Et__builder;325326		public PwdPolicyColumnEntityLogic _003C_003E4__this;327328		public LogicReadWriteParameters parameters;329330		public IEntity entity;331332		public CancellationToken cancellationToken;333334		private ConfiguredTaskAwaiter _003C_003Eu__1;335336		private void MoveNext()337		{338			//IL_007c: Unknown result type (might be due to invalid IL or missing references)339			//IL_0081: Unknown result type (might be due to invalid IL or missing references)340			//IL_0088: Unknown result type (might be due to invalid IL or missing references)341			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)342			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)343			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)344			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)345			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)346			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)347			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)348			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)349			//IL_0036: Unknown result type (might be due to invalid IL or missing references)350			//IL_0041: Unknown result type (might be due to invalid IL or missing references)351			//IL_0046: Unknown result type (might be due to invalid IL or missing references)352			//IL_0049: Unknown result type (might be due to invalid IL or missing references)353			//IL_004e: Unknown result type (might be due to invalid IL or missing references)354			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)355			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)356			//IL_0062: Unknown result type (might be due to invalid IL or missing references)357			//IL_0063: Unknown result type (might be due to invalid IL or missing references)358			int num = _003C_003E1__state;359			PwdPolicyColumnEntityLogic pwdPolicyColumnEntityLogic = _003C_003E4__this;360			try361			{362				ConfiguredTaskAwaiter val;363				ConfiguredTaskAwaitable val2;364				if (num != 0)365				{366					if (num == 1)367					{368						val = _003C_003Eu__1;369						_003C_003Eu__1 = default(ConfiguredTaskAwaiter);370						num = (_003C_003E1__state = -1);371						goto IL_010a;372					}373					val2 = pwdPolicyColumnEntityLogic._HandlePasswordHistoryAsync(parameters.UnitOfWork, parameters.Session, entity, cancellationToken).ConfigureAwait(false);374					val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();375					if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)376					{377						num = (_003C_003E1__state = 0);378						_003C_003Eu__1 = val;379						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003COnSavedAsync_003Ed__4>(ref val, ref this);380						return;381					}382				}383				else384				{385					val = _003C_003Eu__1;386					_003C_003Eu__1 = default(ConfiguredTaskAwaiter);387					num = (_003C_003E1__state = -1);388				}389				((ConfiguredTaskAwaiter)(ref val)).GetResult();390				val2 = ((StateBasedEntityLogic)pwdPolicyColumnEntityLogic).OnSavedAsync(entity, parameters, cancellationToken).ConfigureAwait(false);391				val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();392				if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)393				{394					num = (_003C_003E1__state = 1);395					_003C_003Eu__1 = val;396					((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003COnSavedAsync_003Ed__4>(ref val, ref this);397					return;398				}399				goto IL_010a;400				IL_010a:401				((ConfiguredTaskAwaiter)(ref val)).GetResult();402			}403			catch (System.Exception exception)404			{405				_003C_003E1__state = -2;406				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);407				return;408			}409			_003C_003E1__state = -2;410			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();411		}412413		[DebuggerHidden]414		private void SetStateMachine(IAsyncStateMachine stateMachine)415		{416			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);417		}418	}419420	[StructLayout((LayoutKind)3)]421	[CompilerGenerated]422	private struct _003COnSavingAsync_003Ed__3 : IAsyncStateMachine423	{424		public int _003C_003E1__state;425426		public AsyncTaskMethodBuilder<Diff> _003C_003Et__builder;427428		public PwdPolicyColumnEntityLogic _003C_003E4__this;429430		public LogicReadWriteParameters parameters;431432		public IEntity entity;433434		public CancellationToken cancellationToken;435436		private ConfiguredTaskAwaiter _003C_003Eu__1;437438		private ConfiguredTaskAwaiter<Diff> _003C_003Eu__2;439440		private void MoveNext()441		{442			//IL_0072: Unknown result type (might be due to invalid IL or missing references)443			//IL_0077: Unknown result type (might be due to invalid IL or missing references)444			//IL_007e: Unknown result type (might be due to invalid IL or missing references)445			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)446			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)447			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)448			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)449			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)450			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)451			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)452			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)453			//IL_002b: Unknown result type (might be due to invalid IL or missing references)454			//IL_0036: Unknown result type (might be due to invalid IL or missing references)455			//IL_003b: Unknown result type (might be due to invalid IL or missing references)456			//IL_003f: Unknown result type (might be due to invalid IL or missing references)457			//IL_0044: Unknown result type (might be due to invalid IL or missing references)458			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)459			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)460			//IL_0058: Unknown result type (might be due to invalid IL or missing references)461			//IL_0059: Unknown result type (might be due to invalid IL or missing references)462			int num = _003C_003E1__state;463			PwdPolicyColumnEntityLogic pwdPolicyColumnEntityLogic = _003C_003E4__this;464			Diff result;465			try466			{467				ConfiguredTaskAwaiter<Diff> val;468				ConfiguredTaskAwaiter val3;469				if (num != 0)470				{471					if (num == 1)472					{473						val = _003C_003Eu__2;474						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<Diff>);475						num = (_003C_003E1__state = -1);476						goto IL_0104;477					}478					ConfiguredTaskAwaitable val2 = pwdPolicyColumnEntityLogic._CheckPasswordsAsync(parameters.Session, entity, cancellationToken).ConfigureAwait(false);479					val3 = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();480					if (!((ConfiguredTaskAwaiter)(ref val3)).IsCompleted)481					{482						num = (_003C_003E1__state = 0);483						_003C_003Eu__1 = val3;484						_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003COnSavingAsync_003Ed__3>(ref val3, ref this);485						return;486					}487				}488				else489				{490					val3 = _003C_003Eu__1;491					_003C_003Eu__1 = default(ConfiguredTaskAwaiter);492					num = (_003C_003E1__state = -1);493				}494				((ConfiguredTaskAwaiter)(ref val3)).GetResult();495				val = ((StateBasedEntityLogic)pwdPolicyColumnEntityLogic).OnSavingAsync(entity, parameters, cancellationToken).ConfigureAwait(false).GetAwaiter();496				if (!val.IsCompleted)497				{498					num = (_003C_003E1__state = 1);499					_003C_003Eu__2 = val;500					_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<Diff>, _003COnSavingAsync_003Ed__3>(ref val, ref this);501					return;502				}503				goto IL_0104;504				IL_0104:505				result = val.GetResult();506			}507			catch (System.Exception exception)508			{509				_003C_003E1__state = -2;510				_003C_003Et__builder.SetException(exception);511				return;512			}513			_003C_003E1__state = -2;514			_003C_003Et__builder.SetResult(result);515		}516517		[DebuggerHidden]518		private void SetStateMachine(IAsyncStateMachine stateMachine)519		{520			_003C_003Et__builder.SetStateMachine(stateMachine);521		}522	}523524	[StructLayout((LayoutKind)3)]525	[CompilerGenerated]526	private struct _003C_CheckPasswordAsync_003Ed__7 : IAsyncStateMachine527	{528		public int _003C_003E1__state;529530		public AsyncTaskMethodBuilder _003C_003Et__builder;531532		public PwdPolicyColumnEntityLogic _003C_003E4__this;533534		public IEntity entity;535536		public ISession session;537538		public string columnName;539540		public CancellationToken ct;541542		private IPasswordManager _003CpwdMgr_003E5__2;543544		private PwdColumn _003CpwdColumnData_003E5__3;545546		private PasswordValidationResult _003Cresult_003E5__4;547548		private ConfiguredTaskAwaiter<string> _003C_003Eu__1;549550		private ConfiguredTaskAwaiter<PasswordPolicy> _003C_003Eu__2;551552		private ConfiguredTaskAwaiter<PasswordValidationResult> _003C_003Eu__3;553554		private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__4;555556		private void MoveNext()557		{558			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)559			//IL_00da: Unknown result type (might be due to invalid IL or missing references)560			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)561			//IL_0156: Unknown result type (might be due to invalid IL or missing references)562			//IL_015b: Unknown result type (might be due to invalid IL or missing references)563			//IL_0163: Unknown result type (might be due to invalid IL or missing references)564			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)565			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)566			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)567			//IL_0279: Unknown result type (might be due to invalid IL or missing references)568			//IL_027e: Unknown result type (might be due to invalid IL or missing references)569			//IL_0286: Unknown result type (might be due to invalid IL or missing references)570			//IL_010d: Unknown result type (might be due to invalid IL or missing references)571			//IL_0118: Unknown result type (might be due to invalid IL or missing references)572			//IL_011d: Unknown result type (might be due to invalid IL or missing references)573			//IL_0121: Unknown result type (might be due to invalid IL or missing references)574			//IL_0126: Unknown result type (might be due to invalid IL or missing references)575			//IL_0193: Unknown result type (might be due to invalid IL or missing references)576			//IL_019e: Unknown result type (might be due to invalid IL or missing references)577			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)578			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)579			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)580			//IL_013b: Unknown result type (might be due to invalid IL or missing references)581			//IL_013d: Unknown result type (might be due to invalid IL or missing references)582			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)583			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)584			//IL_0230: Unknown result type (might be due to invalid IL or missing references)585			//IL_023b: Unknown result type (might be due to invalid IL or missing references)586			//IL_0240: Unknown result type (might be due to invalid IL or missing references)587			//IL_0244: Unknown result type (might be due to invalid IL or missing references)588			//IL_0249: Unknown result type (might be due to invalid IL or missing references)589			//IL_025e: Unknown result type (might be due to invalid IL or missing references)590			//IL_0260: Unknown result type (might be due to invalid IL or missing references)591			//IL_008c: Unknown result type (might be due to invalid IL or missing references)592			//IL_0097: Unknown result type (might be due to invalid IL or missing references)593			//IL_009c: Unknown result type (might be due to invalid IL or missing references)594			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)595			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)596			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)597			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)598			int num = _003C_003E1__state;599			PwdPolicyColumnEntityLogic pwdPolicyColumnEntityLogic = _003C_003E4__this;600			try601			{602				ConfiguredTaskAwaiter<string> val4;603				ConfiguredTaskAwaiter<PasswordPolicy> val3;604				ConfiguredTaskAwaiter<PasswordValidationResult> val2;605				ConfiguredTaskAwaiter<IMetaTable> val;606				string result;607				PasswordValidationResult result2;608				PasswordPolicy result3;609				IMetaTable result4;610				IMetaColumn metaColumn;611				switch (num)612				{613				default:614					if (pwdPolicyColumnEntityLogic._pwdStore == null || entity.IsDeleted() || session.IsFullSync())615					{616						break;617					}618					_003CpwdMgr_003E5__2 = session.Resolve<IPasswordManager>();619					_003CpwdColumnData_003E5__3 = pwdPolicyColumnEntityLogic._pwdStore[columnName];620					val4 = _003CpwdMgr_003E5__2.GetPolicyUidForColumnAsync(entity, _003CpwdColumnData_003E5__3.ColumnName, useDefault: true, ct).ConfigureAwait(false).GetAwaiter();621					if (!val4.IsCompleted)622					{623						num = (_003C_003E1__state = 0);624						_003C_003Eu__1 = val4;625						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_CheckPasswordAsync_003Ed__7>(ref val4, ref this);626						return;627					}628					goto IL_00f1;629				case 0:630					val4 = _003C_003Eu__1;631					_003C_003Eu__1 = default(ConfiguredTaskAwaiter<string>);632					num = (_003C_003E1__state = -1);633					goto IL_00f1;634				case 1:635					val3 = _003C_003Eu__2;636					_003C_003Eu__2 = default(ConfiguredTaskAwaiter<PasswordPolicy>);637					num = (_003C_003E1__state = -1);638					goto IL_0172;639				case 2:640					val2 = _003C_003Eu__3;641					_003C_003Eu__3 = default(ConfiguredTaskAwaiter<PasswordValidationResult>);642					num = (_003C_003E1__state = -1);643					goto IL_01f8;644				case 3:645					{646						val = _003C_003Eu__4;647						_003C_003Eu__4 = default(ConfiguredTaskAwaiter<IMetaTable>);648						num = (_003C_003E1__state = -1);649						goto IL_0295;650					}651					IL_00f1:652					result = val4.GetResult();653					val3 = _003CpwdMgr_003E5__2.GetPolicyAsync(result, entity, columnName, ct).ConfigureAwait(false).GetAwaiter();654					if (!val3.IsCompleted)655					{656						num = (_003C_003E1__state = 1);657						_003C_003Eu__2 = val3;658						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<PasswordPolicy>, _003C_CheckPasswordAsync_003Ed__7>(ref val3, ref this);659						return;660					}661					goto IL_0172;662					IL_01f8:663					result2 = val2.GetResult();664					_003Cresult_003E5__4 = result2;665					if (!_003Cresult_003E5__4.IsValid)666					{667						val = session.MetaData().GetTableAsync(entity.Tablename, ct).ConfigureAwait(false)668							.GetAwaiter();669						if (!val.IsCompleted)670						{671							num = (_003C_003E1__state = 3);672							_003C_003Eu__4 = val;673							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_CheckPasswordAsync_003Ed__7>(ref val, ref this);674							return;675						}676						goto IL_0295;677					}678					_003CpwdColumnData_003E5__3.IsChecked = true;679					break;680					IL_0172:681					result3 = val3.GetResult();682					_003CpwdColumnData_003E5__3.Policy = result3;683					val2 = result3.ValidatePasswordAsync(_003CpwdColumnData_003E5__3.Password, ct).ConfigureAwait(false).GetAwaiter();684					if (!val2.IsCompleted)685					{686						num = (_003C_003E1__state = 2);687						_003C_003Eu__3 = val2;688						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<PasswordValidationResult>, _003C_CheckPasswordAsync_003Ed__7>(ref val2, ref this);689						return;690					}691					goto IL_01f8;692					IL_0295:693					result4 = val.GetResult();694					metaColumn = result4.Columns[_003CpwdColumnData_003E5__3.ColumnName];695					throw new PasswordValidationException(_003Cresult_003E5__4, result4.DisplaySingular.Translated, metaColumn.Display.Translated);696				}697			}698			catch (System.Exception exception)699			{700				_003C_003E1__state = -2;701				_003CpwdMgr_003E5__2 = null;702				_003CpwdColumnData_003E5__3 = null;703				_003Cresult_003E5__4 = null;704				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);705				return;706			}707			_003C_003E1__state = -2;708			_003CpwdMgr_003E5__2 = null;709			_003CpwdColumnData_003E5__3 = null;710			_003Cresult_003E5__4 = null;711			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();712		}713714		[DebuggerHidden]715		private void SetStateMachine(IAsyncStateMachine stateMachine)716		{717			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);718		}719	}720721	[StructLayout((LayoutKind)3)]722	[CompilerGenerated]723	private struct _003C_CheckPasswordsAsync_003Ed__8 : IAsyncStateMachine724	{725		public int _003C_003E1__state;726727		public AsyncTaskMethodBuilder _003C_003Et__builder;728729		public PwdPolicyColumnEntityLogic _003C_003E4__this;730731		public IEntity entity;732733		public ISession session;734735		public CancellationToken ct;736737		private IPasswordManager _003CpwdMgr_003E5__2;738739		private System.Collections.Generic.IEnumerator<PwdColumn> _003C_003E7__wrap2;740741		private PwdColumn _003CpwdColumnData_003E5__4;742743		private PasswordValidationResult _003Cresult_003E5__5;744745		private ConfiguredTaskAwaiter<string> _003C_003Eu__1;746747		private ConfiguredTaskAwaiter<PasswordPolicy> _003C_003Eu__2;748749		private ConfiguredTaskAwaiter<PasswordValidationResult> _003C_003Eu__3;750751		private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__4;752753		private void MoveNext()754		{755			//IL_013f: Unknown result type (might be due to invalid IL or missing references)756			//IL_0144: Unknown result type (might be due to invalid IL or missing references)757			//IL_014c: Unknown result type (might be due to invalid IL or missing references)758			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)759			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)760			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)761			//IL_024b: Unknown result type (might be due to invalid IL or missing references)762			//IL_0250: Unknown result type (might be due to invalid IL or missing references)763			//IL_0258: Unknown result type (might be due to invalid IL or missing references)764			//IL_0346: Unknown result type (might be due to invalid IL or missing references)765			//IL_034b: Unknown result type (might be due to invalid IL or missing references)766			//IL_0353: Unknown result type (might be due to invalid IL or missing references)767			//IL_017c: Unknown result type (might be due to invalid IL or missing references)768			//IL_0187: Unknown result type (might be due to invalid IL or missing references)769			//IL_018c: Unknown result type (might be due to invalid IL or missing references)770			//IL_0190: Unknown result type (might be due to invalid IL or missing references)771			//IL_0195: Unknown result type (might be due to invalid IL or missing references)772			//IL_0202: Unknown result type (might be due to invalid IL or missing references)773			//IL_020d: Unknown result type (might be due to invalid IL or missing references)774			//IL_0212: Unknown result type (might be due to invalid IL or missing references)775			//IL_0216: Unknown result type (might be due to invalid IL or missing references)776			//IL_021b: Unknown result type (might be due to invalid IL or missing references)777			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)778			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)779			//IL_0230: Unknown result type (might be due to invalid IL or missing references)780			//IL_0232: Unknown result type (might be due to invalid IL or missing references)781			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)782			//IL_0308: Unknown result type (might be due to invalid IL or missing references)783			//IL_030d: Unknown result type (might be due to invalid IL or missing references)784			//IL_0311: Unknown result type (might be due to invalid IL or missing references)785			//IL_0316: Unknown result type (might be due to invalid IL or missing references)786			//IL_032b: Unknown result type (might be due to invalid IL or missing references)787			//IL_032d: Unknown result type (might be due to invalid IL or missing references)788			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)789			//IL_0101: Unknown result type (might be due to invalid IL or missing references)790			//IL_0106: Unknown result type (might be due to invalid IL or missing references)791			//IL_010a: Unknown result type (might be due to invalid IL or missing references)792			//IL_010f: Unknown result type (might be due to invalid IL or missing references)793			//IL_0124: Unknown result type (might be due to invalid IL or missing references)794			//IL_0126: Unknown result type (might be due to invalid IL or missing references)795			int num = _003C_003E1__state;796			PwdPolicyColumnEntityLogic pwdPolicyColumnEntityLogic = _003C_003E4__this;797			try798			{799				if ((uint)num <= 3u)800				{801					goto IL_005c;802				}803				if (pwdPolicyColumnEntityLogic._pwdStore != null && !entity.IsDeleted() && !session.IsFullSync())804				{805					_003CpwdMgr_003E5__2 = session.Resolve<IPasswordManager>();806					_003C_003E7__wrap2 = pwdPolicyColumnEntityLogic._pwdStore.GetEnumerator();807					goto IL_005c;808				}809				goto end_IL_000e;810				IL_005c:811				try812				{813					ConfiguredTaskAwaiter<string> val4;814					ConfiguredTaskAwaiter<PasswordPolicy> val3;815					ConfiguredTaskAwaiter<PasswordValidationResult> val2;816					ConfiguredTaskAwaiter<IMetaTable> val;817					string result;818					PasswordValidationResult result2;819					PasswordPolicy result3;820					switch (num)821					{822					case 0:823						val4 = _003C_003Eu__1;824						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<string>);825						num = (_003C_003E1__state = -1);826						goto IL_015b;827					case 1:828						val3 = _003C_003Eu__2;829						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<PasswordPolicy>);830						num = (_003C_003E1__state = -1);831						goto IL_01e1;832					case 2:833						val2 = _003C_003Eu__3;834						_003C_003Eu__3 = default(ConfiguredTaskAwaiter<PasswordValidationResult>);835						num = (_003C_003E1__state = -1);836						goto IL_0267;837					case 3:838						val = _003C_003Eu__4;839						_003C_003Eu__4 = default(ConfiguredTaskAwaiter<IMetaTable>);840						num = (_003C_003E1__state = -1);841						break;842					default:843						{844							while (((System.Collections.IEnumerator)_003C_003E7__wrap2).MoveNext())845							{846								_003CpwdColumnData_003E5__4 = _003C_003E7__wrap2.Current;847								if (!entity.Columns.Contains(_003CpwdColumnData_003E5__4.ColumnName) || !entity.Columns[_003CpwdColumnData_003E5__4.ColumnName].IsChanged || _003CpwdColumnData_003E5__4.IsChecked)848								{849									continue;850								}851								val4 = _003CpwdMgr_003E5__2.GetPolicyUidForColumnAsync(entity, _003CpwdColumnData_003E5__4.ColumnName, useDefault: true, ct).ConfigureAwait(false).GetAwaiter();852								if (!val4.IsCompleted)853								{854									num = (_003C_003E1__state = 0);855									_003C_003Eu__1 = val4;856									((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_CheckPasswordsAsync_003Ed__8>(ref val4, ref this);857									return;858								}859								goto IL_015b;860							}861							goto end_IL_005c;862						}863						IL_015b:864						result = val4.GetResult();865						val3 = _003CpwdMgr_003E5__2.GetPolicyAsync(result, entity, _003CpwdColumnData_003E5__4.ColumnName, ct).ConfigureAwait(false).GetAwaiter();866						if (!val3.IsCompleted)867						{868							num = (_003C_003E1__state = 1);869							_003C_003Eu__2 = val3;870							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<PasswordPolicy>, _003C_CheckPasswordsAsync_003Ed__8>(ref val3, ref this);871							return;872						}873						goto IL_01e1;874						IL_0267:875						result2 = val2.GetResult();876						_003Cresult_003E5__5 = result2;877						if (!_003Cresult_003E5__5.IsValid)878						{879							NLogExtensions.Debug(LogManager.GetLogger("ObjectLog"), new LogSessionId(session.Id), "Password failed following rules: {0}", string.Join(", ", Enumerable.Select<ICultureDependentString, string>((System.Collections.Generic.IEnumerable<ICultureDependentString>)_003Cresult_003E5__5.ValidationErrors, (Func<ICultureDependentString, string>)((ICultureDependentString e) => e.Translated))));880							val = session.MetaData().GetTableAsync(entity.Tablename, ct).ConfigureAwait(false)881								.GetAwaiter();882							if (!val.IsCompleted)883							{884								num = (_003C_003E1__state = 3);885								_003C_003Eu__4 = val;886								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_CheckPasswordsAsync_003Ed__8>(ref val, ref this);887								return;888							}889							break;890						}891						_003Cresult_003E5__5 = null;892						_003CpwdColumnData_003E5__4 = null;893						goto default;894						IL_01e1:895						result3 = val3.GetResult();896						_003CpwdColumnData_003E5__4.Policy = result3;897						val2 = result3.ValidatePasswordAsync(_003CpwdColumnData_003E5__4.Password, ct).ConfigureAwait(false).GetAwaiter();898						if (!val2.IsCompleted)899						{900							num = (_003C_003E1__state = 2);901							_003C_003Eu__3 = val2;902							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<PasswordValidationResult>, _003C_CheckPasswordsAsync_003Ed__8>(ref val2, ref this);903							return;904						}905						goto IL_0267;906					}907					IMetaTable result4 = val.GetResult();908					IMetaColumn metaColumn = result4.Columns[_003CpwdColumnData_003E5__4.ColumnName];909					throw new PasswordValidationException(_003Cresult_003E5__5, result4.DisplaySingular.Translated, metaColumn.Display.Translated);910					end_IL_005c:;911				}912				finally913				{914					if (num < 0 && _003C_003E7__wrap2 != null)915					{916						((System.IDisposable)_003C_003E7__wrap2).Dispose();917					}918				}919				_003C_003E7__wrap2 = null;920				end_IL_000e:;921			}922			catch (System.Exception exception)923			{924				_003C_003E1__state = -2;925				_003CpwdMgr_003E5__2 = null;926				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);927				return;928			}929			_003C_003E1__state = -2;930			_003CpwdMgr_003E5__2 = null;931			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();932		}933934		[DebuggerHidden]935		private void SetStateMachine(IAsyncStateMachine stateMachine)936		{937			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);938		}939	}940941	[StructLayout((LayoutKind)3)]942	[CompilerGenerated]943	private struct _003C_HandlePasswordHistoryAsync_003Ed__9 : IAsyncStateMachine944	{945		public int _003C_003E1__state;946947		public AsyncTaskMethodBuilder _003C_003Et__builder;948949		public PwdPolicyColumnEntityLogic _003C_003E4__this;950951		public IEntity entity;952953		public ISession session;954955		public IUnitOfWork uow;956957		public CancellationToken cancellationToken;958959		private IPasswordHandler _003CpwdHdl_003E5__2;960961		private System.Collections.Generic.IEnumerator<PwdColumn> _003C_003E7__wrap2;962963		private ConfiguredTaskAwaiter _003C_003Eu__1;964965		private void MoveNext()966		{967			//IL_0106: Unknown result type (might be due to invalid IL or missing references)968			//IL_010b: Unknown result type (might be due to invalid IL or missing references)969			//IL_0113: Unknown result type (might be due to invalid IL or missing references)970			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)971			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)972			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)973			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)974			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)975			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)976			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)977			int num = _003C_003E1__state;978			PwdPolicyColumnEntityLogic pwdPolicyColumnEntityLogic = _003C_003E4__this;979			try980			{981				if (num == 0)982				{983					goto IL_004e;984				}985				if (pwdPolicyColumnEntityLogic._pwdStore != null && !entity.IsDeleted())986				{987					_003CpwdHdl_003E5__2 = session.Resolve<IPasswordHandler>();988					_003C_003E7__wrap2 = pwdPolicyColumnEntityLogic._pwdStore.GetEnumerator();989					goto IL_004e;990				}991				goto end_IL_000e;992				IL_004e:993				try994				{995					if (num != 0)996					{997						goto IL_0129;998					}999					ConfiguredTaskAwaiter val = _003C_003Eu__1;1000					_003C_003Eu__1 = default(ConfiguredTaskAwaiter);1001					num = (_003C_003E1__state = -1);1002					goto IL_0122;1003					IL_0122:1004					((ConfiguredTaskAwaiter)(ref val)).GetResult();1005					goto IL_0129;1006					IL_0129:1007					while (((System.Collections.IEnumerator)_003C_003E7__wrap2).MoveNext())1008					{1009						PwdColumn current = _003C_003E7__wrap2.Current;1010						PasswordPolicy policy = current.Policy;1011						if (policy == null || policy.HistoryLen <= 0)1012						{1013							continue;1014						}1015						DbObjectKey accountKey = DbObjectKey.Create(session.MetaData(), entity);1016						ConfiguredTaskAwaitable val2 = _003CpwdHdl_003E5__2.AddToHistoryAsync(uow, policy, accountKey, current.ColumnName, current.Password, entity.IsLoaded, cancellationToken).ConfigureAwait(false);1017						val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();1018						if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1019						{1020							num = (_003C_003E1__state = 0);1021							_003C_003Eu__1 = val;1022							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_HandlePasswordHistoryAsync_003Ed__9>(ref val, ref this);1023							return;1024						}1025						goto IL_0122;1026					}1027				}1028				finally1029				{1030					if (num < 0 && _003C_003E7__wrap2 != null)1031					{1032						((System.IDisposable)_003C_003E7__wrap2).Dispose();1033					}1034				}1035				_003C_003E7__wrap2 = null;1036				end_IL_000e:;1037			}1038			catch (System.Exception exception)1039			{1040				_003C_003E1__state = -2;1041				_003CpwdHdl_003E5__2 = null;1042				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1043				return;1044			}1045			_003C_003E1__state = -2;1046			_003CpwdHdl_003E5__2 = null;1047			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1048		}10491050		[DebuggerHidden]1051		private void SetStateMachine(IAsyncStateMachine stateMachine)1052		{1053			((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1054		}1055	}10561057	private PwdStore? _pwdStore;10581059	public PwdPolicyColumnEntityLogic()1060	{1061		RegisterFunction("GetPwdPolicyUid").As<string, bool, string>([AsyncStateMachine(typeof(_003C_003Ec._003C_003C_002Dctor_003Eb__1_0_003Ed))] async (ISession s, IEntity e, string columnName, bool addDefault, CancellationToken ct) =>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_002f: Unknown result type (might be due to invalid IL or missing references)1066			//IL_0031: Unknown result type (might be due to invalid IL or missing references)1067			IPasswordManager passwordManager = s.Resolve<IPasswordManager>();1068			return (passwordManager == null) ? null : (await passwordManager.GetPolicyUidForColumnAsync(e, columnName, addDefault, ct).ConfigureAwait(false));1069		}).Description("Method_PwdPolicyColumnEntityLogic_GetPwdPolicy").Behavior(MethodBehavior.ValidForReadOnlyUser);1070	}10711072	[AsyncStateMachine(typeof(_003COnInitializeAsync_003Ed__2))]1073	public override async System.Threading.Tasks.Task<Diff> OnInitializeAsync(IEntity entity, LogicReadOnlyParameters parameters, CancellationToken cancellationToken)1074	{1075		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1076		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1077		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1078		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1079		if (!parameters.Session.IsFullSync())1080		{1081			IPasswordManager passwordManager = parameters.Session.Resolve<IPasswordManager>();1082			if (passwordManager != null)1083			{1084				PolicyTableInfo policyTableInfo = await passwordManager.GetPolicyColumnsForTableAsync(entity.Tablename, cancellationToken).ConfigureAwait(false);1085				if (policyTableInfo != null)1086				{1087					_pwdStore = new PwdStore();1088					System.Collections.Generic.IEnumerator<PolicyColumnInfo> enumerator = policyTableInfo.Columns.GetEnumerator();1089					try1090					{1091						while (((System.Collections.IEnumerator)enumerator).MoveNext())1092						{1093							PolicyColumnInfo ptColumn = enumerator.Current;1094							Format(ptColumn.Column.Columnname).AsExpensive<string, string>((Func<ISession, IEntity, string, CancellationToken, System.Threading.Tasks.Task<string>>)([AsyncStateMachine(typeof(_003C_003Ec__DisplayClass2_0._003C_003COnInitializeAsync_003Eb__0_003Ed))] async (ISession s, IEntity e, string val, CancellationToken ct) =>1095							{1096								//IL_0002: Unknown result type (might be due to invalid IL or missing references)1097								//IL_0007: Unknown result type (might be due to invalid IL or missing references)1098								//IL_002e: Unknown result type (might be due to invalid IL or missing references)1099								//IL_0030: Unknown result type (might be due to invalid IL or missing references)1100								if (e.State.HasFlagFast(EntityState.Discard) || HashFunction.IsHashed(val) || (ptColumn.Column.IsCrypted && PwdStore.IsEncrypted(val)) || (s.IsFullSync() && string.IsNullOrEmpty(val) && string.IsNullOrEmpty(e.Columns[ptColumn.Column.Columnname].GetOldValue<string>())))1101								{1102									_pwdStore.Remove(ptColumn.Column.Columnname);1103									return val;1104								}1105								_pwdStore[ptColumn.Column.Columnname].Password = val.ToSecure();1106								_pwdStore[ptColumn.Column.Columnname].IsChecked = false;1107								await _CheckPasswordAsync(s, e, ptColumn.Column.Columnname, ct).ConfigureAwait(false);1108								return val;1109							}));1110							System.Collections.Generic.IEnumerator<PolicyReferenceInfo> enumerator2 = ptColumn.References.GetEnumerator();1111							try1112							{1113								while (((System.Collections.IEnumerator)enumerator2).MoveNext())1114								{1115									IMetaColumn metaColumn = Enumerable.FirstOrDefault<IMetaColumn>((System.Collections.Generic.IEnumerable<IMetaColumn>)enumerator2.Current.ScopeReferenceColumns);1116									if (metaColumn != null)1117									{1118										Format(metaColumn.Columnname).As<string, string>(delegate(string val)1119										{1120											_pwdStore[ptColumn.Column.Columnname].IsChecked = false;1121											return val;1122										});1123									}1124								}1125							}1126							finally1127							{1128								((System.IDisposable)enumerator2)?.Dispose();1129							}1130						}1131					}1132					finally1133					{1134						((System.IDisposable)enumerator)?.Dispose();1135					}1136				}1137			}1138		}1139		return await base.OnInitializeAsync(entity, parameters, cancellationToken).ConfigureAwait(false);1140	}11411142	[AsyncStateMachine(typeof(_003COnSavingAsync_003Ed__3))]1143	public override async System.Threading.Tasks.Task<Diff> OnSavingAsync(IEntity entity, LogicReadWriteParameters parameters, CancellationToken cancellationToken)1144	{1145		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1146		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1147		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1148		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1149		await _CheckPasswordsAsync(parameters.Session, entity, cancellationToken).ConfigureAwait(false);1150		return await base.OnSavingAsync(entity, parameters, cancellationToken).ConfigureAwait(false);1151	}11521153	[AsyncStateMachine(typeof(_003COnSavedAsync_003Ed__4))]1154	public override System.Threading.Tasks.Task OnSavedAsync(IEntity entity, LogicReadWriteParameters parameters, CancellationToken cancellationToken)1155	{1156		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1157		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1158		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1159		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1160		_003COnSavedAsync_003Ed__4 _003COnSavedAsync_003Ed__ = default(_003COnSavedAsync_003Ed__4);1161		_003COnSavedAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1162		_003COnSavedAsync_003Ed__._003C_003E4__this = this;1163		_003COnSavedAsync_003Ed__.entity = entity;1164		_003COnSavedAsync_003Ed__.parameters = parameters;1165		_003COnSavedAsync_003Ed__.cancellationToken = cancellationToken;1166		_003COnSavedAsync_003Ed__._003C_003E1__state = -1;1167		((AsyncTaskMethodBuilder)(ref _003COnSavedAsync_003Ed__._003C_003Et__builder)).Start<_003COnSavedAsync_003Ed__4>(ref _003COnSavedAsync_003Ed__);1168		return ((AsyncTaskMethodBuilder)(ref _003COnSavedAsync_003Ed__._003C_003Et__builder)).Task;1169	}11701171	public override void BeginTransaction()1172	{1173		if (_pwdStore != null && _pwdStore.Count > 0)1174		{1175			SetData("PwdData", _pwdStore.AsString());1176		}1177		base.BeginTransaction();1178	}11791180	public override void RollbackTransaction()1181	{1182		if (_pwdStore != null)1183		{1184			_pwdStore.Clear();1185			if (TryGetData("PwdData", out SecureString data))1186			{1187				_pwdStore.FromString(data);1188			}1189		}1190		base.RollbackTransaction();1191	}11921193	[AsyncStateMachine(typeof(_003C_CheckPasswordAsync_003Ed__7))]1194	private System.Threading.Tasks.Task _CheckPasswordAsync(ISession session, IEntity entity, string columnName, CancellationToken ct)1195	{1196		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1197		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1198		//IL_002e: Unknown result type (might be due to invalid IL or missing references)1199		//IL_0030: Unknown result type (might be due to invalid IL or missing references)1200		_003C_CheckPasswordAsync_003Ed__7 _003C_CheckPasswordAsync_003Ed__ = default(_003C_CheckPasswordAsync_003Ed__7);1201		_003C_CheckPasswordAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1202		_003C_CheckPasswordAsync_003Ed__._003C_003E4__this = this;1203		_003C_CheckPasswordAsync_003Ed__.session = session;1204		_003C_CheckPasswordAsync_003Ed__.entity = entity;1205		_003C_CheckPasswordAsync_003Ed__.columnName = columnName;1206		_003C_CheckPasswordAsync_003Ed__.ct = ct;1207		_003C_CheckPasswordAsync_003Ed__._003C_003E1__state = -1;1208		((AsyncTaskMethodBuilder)(ref _003C_CheckPasswordAsync_003Ed__._003C_003Et__builder)).Start<_003C_CheckPasswordAsync_003Ed__7>(ref _003C_CheckPasswordAsync_003Ed__);1209		return ((AsyncTaskMethodBuilder)(ref _003C_CheckPasswordAsync_003Ed__._003C_003Et__builder)).Task;1210	}12111212	[AsyncStateMachine(typeof(_003C_CheckPasswordsAsync_003Ed__8))]1213	private System.Threading.Tasks.Task _CheckPasswordsAsync(ISession session, IEntity entity, CancellationToken ct)1214	{1215		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1216		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1217		//IL_0026: Unknown result type (might be due to invalid IL or missing references)1218		//IL_0027: Unknown result type (might be due to invalid IL or missing references)1219		_003C_CheckPasswordsAsync_003Ed__8 _003C_CheckPasswordsAsync_003Ed__ = default(_003C_CheckPasswordsAsync_003Ed__8);1220		_003C_CheckPasswordsAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1221		_003C_CheckPasswordsAsync_003Ed__._003C_003E4__this = this;1222		_003C_CheckPasswordsAsync_003Ed__.session = session;1223		_003C_CheckPasswordsAsync_003Ed__.entity = entity;1224		_003C_CheckPasswordsAsync_003Ed__.ct = ct;1225		_003C_CheckPasswordsAsync_003Ed__._003C_003E1__state = -1;1226		((AsyncTaskMethodBuilder)(ref _003C_CheckPasswordsAsync_003Ed__._003C_003Et__builder)).Start<_003C_CheckPasswordsAsync_003Ed__8>(ref _003C_CheckPasswordsAsync_003Ed__);1227		return ((AsyncTaskMethodBuilder)(ref _003C_CheckPasswordsAsync_003Ed__._003C_003Et__builder)).Task;1228	}12291230	[AsyncStateMachine(typeof(_003C_HandlePasswordHistoryAsync_003Ed__9))]1231	private System.Threading.Tasks.Task _HandlePasswordHistoryAsync(IUnitOfWork uow, ISession session, IEntity entity, CancellationToken cancellationToken)1232	{1233		//IL_0002: Unknown result type (might be due to invalid IL or missing references)1234		//IL_0007: Unknown result type (might be due to invalid IL or missing references)1235		//IL_002e: Unknown result type (might be due to invalid IL or missing references)1236		//IL_0030: Unknown result type (might be due to invalid IL or missing references)1237		_003C_HandlePasswordHistoryAsync_003Ed__9 _003C_HandlePasswordHistoryAsync_003Ed__ = default(_003C_HandlePasswordHistoryAsync_003Ed__9);1238		_003C_HandlePasswordHistoryAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();1239		_003C_HandlePasswordHistoryAsync_003Ed__._003C_003E4__this = this;1240		_003C_HandlePasswordHistoryAsync_003Ed__.uow = uow;1241		_003C_HandlePasswordHistoryAsync_003Ed__.session = session;1242		_003C_HandlePasswordHistoryAsync_003Ed__.entity = entity;1243		_003C_HandlePasswordHistoryAsync_003Ed__.cancellationToken = cancellationToken;1244		_003C_HandlePasswordHistoryAsync_003Ed__._003C_003E1__state = -1;1245		((AsyncTaskMethodBuilder)(ref _003C_HandlePasswordHistoryAsync_003Ed__._003C_003Et__builder)).Start<_003C_HandlePasswordHistoryAsync_003Ed__9>(ref _003C_HandlePasswordHistoryAsync_003Ed__);1246		return ((AsyncTaskMethodBuilder)(ref _003C_HandlePasswordHistoryAsync_003Ed__._003C_003Et__builder)).Task;1247	}1248}1249