VI.DB.Compile/VI.DB.Compile.SourceGenerators/JobsSourceGenerator.cs

Compact public source page. The previous oversized rendered HTML was archived outside the public site; this page keeps source-derived context plus a bounded excerpt for browsing/search.

original 0.73 MBcompact pageexcerpt 2 lines

Source-derived context

VI.DB.Compile/VI.DB.Compile.SourceGenerators/JobsSourceGenerator.cs Back to OIM Explorer VI.DB.Compile/VI.DB.Compile.SourceGenerators/JobsSourceGenerator.cs Decompiler Source File VI.DB.Compile.JobsSourceGenerator Decompiled Source 10 extracted method/event/call references in JobsSourceGenerator. Source: F:\Claude\.tmp\oim-decompiled-full\1176_One_Identity_Manager_VI.DB.Compile.dll\VI.DB.Compile.SourceGenerators\JobsSourceGenerator.cs Source size: 192.754 characters Interpretation Decompiled sou

Bounded excerpt

First lines from the rendered source block, bounded to keep the public page fast.

1using System;2using System.CodeDom.Compiler;3using System.Collections;4using System.Collections.Generic;5using System.Data;6using System.Data.Common;7using System.Diagnostics;8using System.Globalization;9using System.IO;10using System.Linq;11using System.Reflection;12using System.Runtime.CompilerServices;13using System.Runtime.InteropServices;14using System.Text;15using System.Text.RegularExpressions;16using System.Text.RegularExpressions.Generated;17using System.Threading;18using System.Threading.Tasks;19using VI.Base;20using VI.Base.Helper;21using VI.Base.Scripting;22using VI.DB.DataAccess;23using VI.DB.MetaData;24using VI.DB.Scripting;25using VI.DB.Sync;2627namespace VI.DB.Compile.SourceGenerators;2829internal class JobsSourceGenerator : SingleClassSourceGeneratorBase30{31	private class JobsAssemblyGenerator32	{33		[RequiredMember]34		private class _PreloadTable35		{36			[RequiredMember]37			[field: CompilerGenerated]38			public string Table39			{40				[CompilerGenerated]41				get;42				[CompilerGenerated]43				init;44			}4546			[RequiredMember]47			[field: CompilerGenerated]48			public string Where49			{50				[CompilerGenerated]51				get;52				[CompilerGenerated]53				init;54			}5556			[RequiredMember]57			[field: CompilerGenerated]58			public string[] Columns59			{60				[CompilerGenerated]61				get;62				[CompilerGenerated]63				init;64			}6566			[field: CompilerGenerated]67			public string? DisplayColumn68			{69				[CompilerGenerated]70				get;71				[CompilerGenerated]72				set;73			}7475			[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]76			[CompilerFeatureRequired("RequiredMembers")]77			public _PreloadTable()78			{79			}80		}8182		private class _ValueReplacer83		{84			[CompilerGenerated]85			private sealed class _003C_003Ec__DisplayClass11_086			{87				public _ValueReplacer _003C_003E4__this;8889				public string valueName;9091				internal string _003C_ReplaceMatchAsync_003Eb__0()92				{93					return _003C_003E4__this._GetPropertyDisplay(_003C_003E4__this._baseTable, _003C_003E4__this._dataObject, valueName);94				}95			}9697			[StructLayout((LayoutKind)3)]98			[CompilerGenerated]99			private struct _003C_ReplaceMatchAsync_003Ed__11 : IAsyncStateMachine100			{101				public int _003C_003E1__state;102103				public AsyncTaskMethodBuilder<string> _003C_003Et__builder;104105				public _ValueReplacer _003C_003E4__this;106107				public Match m;108109				public CancellationToken ct;110111				private _003C_003Ec__DisplayClass11_0 _003C_003E8__1;112113				private object _003Cval_003E5__2;114115				private ConfiguredTaskAwaiter _003C_003Eu__1;116117				private void MoveNext()118				{119					//IL_024f: Unknown result type (might be due to invalid IL or missing references)120					//IL_0254: Unknown result type (might be due to invalid IL or missing references)121					//IL_025c: Unknown result type (might be due to invalid IL or missing references)122					//IL_0206: Unknown result type (might be due to invalid IL or missing references)123					//IL_0211: Unknown result type (might be due to invalid IL or missing references)124					//IL_0216: Unknown result type (might be due to invalid IL or missing references)125					//IL_021a: Unknown result type (might be due to invalid IL or missing references)126					//IL_021f: Unknown result type (might be due to invalid IL or missing references)127					//IL_0234: Unknown result type (might be due to invalid IL or missing references)128					//IL_0236: Unknown result type (might be due to invalid IL or missing references)129					int num = _003C_003E1__state;130					_ValueReplacer valueReplacer = _003C_003E4__this;131					string result;132					try133					{134						ConfiguredTaskAwaiter val;135						if (num == 0)136						{137							val = _003C_003Eu__1;138							_003C_003Eu__1 = default(ConfiguredTaskAwaiter);139							num = (_003C_003E1__state = -1);140							goto IL_026b;141						}142						_003C_003E8__1 = new _003C_003Ec__DisplayClass11_0();143						_003C_003E8__1._003C_003E4__this = _003C_003E4__this;144						_003C_003E8__1.valueName = ((Capture)m.Groups["value"]).Value;145						Group val2 = m.Groups["format"];146						string text;147						if (string.Equals(_003C_003E8__1.valueName, "ObjectKey", (StringComparison)5))148						{149							result = _CreateObjectKey(valueReplacer._baseTable, valueReplacer._dataObject).ToXmlString();150						}151						else152						{153							_003Cval_003E5__2 = valueReplacer._GetValue(_003C_003E8__1.valueName);154							if (!val2.Success)155							{156								result = DbVal.ConvertTo<string>(_003Cval_003E5__2);157							}158							else159							{160								text = ((Capture)val2).Value.ToLowerInvariant();161								if (text == null)162								{163									goto IL_0439;164								}165								switch (text.Length)166								{167								case 2:168									break;169								case 3:170									if (!(text == "int"))171									{172										goto IL_0439;173									}174									result = DbVal.ConvertTo<int>(_003Cval_003E5__2).ToString((IFormatProvider)(object)CultureInfo.InvariantCulture);175									goto end_IL_000e;176								case 4:177									if (!(text == "bool"))178									{179										goto IL_0439;180									}181									result = (DbVal.ConvertTo<bool>(_003Cval_003E5__2) ? "True" : "False");182									goto end_IL_000e;183								case 7:184									goto IL_01a1;185								case 6:186									if (!(text == "string"))187									{188										goto IL_0439;189									}190									result = DbVal.ConvertTo<string>(_003Cval_003E5__2).Replace("\"", "\"\"").Replace("\ufffd", "\"\"")191										.Replace("\ufffd", "\"\"");192									goto end_IL_000e;193								default:194									goto IL_0439;195								}196								char c = text[0];197								if (c != 'c')198								{199									if (c != 'f')200									{201										if (c != 'l' || !(text == "ld"))202										{203											goto IL_0439;204										}205										ConfiguredTaskAwaitable val3 = valueReplacer._checkPropertyReferences.Invoke(DbVal.ConvertTo<string>(_003Cval_003E5__2), (Func<string>)(() => _003C_003E8__1._003C_003E4__this._GetPropertyDisplay(_003C_003E8__1._003C_003E4__this._baseTable, _003C_003E8__1._003C_003E4__this._dataObject, _003C_003E8__1.valueName)), ct).ConfigureAwait(false);206										val = ((ConfiguredTaskAwaitable)(ref val3)).GetAwaiter();207										if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)208										{209											num = (_003C_003E1__state = 0);210											_003C_003Eu__1 = val;211											_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_ReplaceMatchAsync_003Ed__11>(ref val, ref this);212											return;213										}214										goto IL_026b;215									}216									if (!(text == "fn"))217									{218										goto IL_0439;219									}220									result = FunctionName.Create(DbVal.ConvertTo<string>(_003Cval_003E5__2));221								}222								else223								{224									if (!(text == "cd"))225									{226										goto IL_0439;227									}228									result = (valueReplacer._baseTable.Columns.TryGetValue(_003C_003E8__1.valueName, out var value) ? value.Display.Translated : _003C_003E8__1.valueName).Replace("\"", "\"\"");229								}230							}231						}232						goto end_IL_000e;233						IL_0439:234						result = DbVal.ConvertTo<string>(_003Cval_003E5__2);235						goto end_IL_000e;236						IL_01a1:237						if (!(text == "version"))238						{239							goto IL_0439;240						}241						int[] array = new int[4];242						Match val4 = _regVersion.Match(DbVal.ConvertTo<string>(_003Cval_003E5__2));243						if (((Group)val4).Success)244						{245							for (int num2 = 0; num2 < 4; num2++)246							{247								array[num2] = int.Parse(((Capture)val4.Groups[num2 + 1]).Value);248							}249							CultureInfo invariantCulture = CultureInfo.InvariantCulture;250							global::_003C_003Ey__InlineArray4<object> buffer = default(global::_003C_003Ey__InlineArray4<object>);251							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 0) = array[0];252							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 1) = array[1];253							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 2) = array[2];254							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 3) = array[3];255							result = string.Format((IFormatProvider)(object)invariantCulture, "{0}.{1}.{2}.{3}", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray4<object>, object>(in buffer, 4));256						}257						else258						{259							result = DbVal.ConvertTo<string>(_003Cval_003E5__2);260						}261						goto end_IL_000e;262						IL_026b:263						((ConfiguredTaskAwaiter)(ref val)).GetResult();264						result = ScriptSyntax.ReplaceLanguageDependentExpressions(valueReplacer._baseTable.Tablename, _003C_003E8__1.valueName, DbVal.ConvertTo<string>(_003Cval_003E5__2));265						end_IL_000e:;266					}267					catch (System.Exception exception)268					{269						_003C_003E1__state = -2;270						_003C_003E8__1 = null;271						_003Cval_003E5__2 = null;272						_003C_003Et__builder.SetException(exception);273						return;274					}275					_003C_003E1__state = -2;276					_003C_003E8__1 = null;277					_003Cval_003E5__2 = null;278					_003C_003Et__builder.SetResult(result);279				}280281				[DebuggerHidden]282				private void SetStateMachine(IAsyncStateMachine stateMachine)283				{284					_003C_003Et__builder.SetStateMachine(stateMachine);285				}286			}287288			private static readonly Regex _regPattern = _CreateRegPattern();289290			private static readonly Regex _regVersion = _CreateRegVersion();291292			private readonly IMetaData _metaData;293294			private readonly IMetaTable _baseTable;295296			private readonly _DataObject _dataObject;297298			private readonly _PreloadData _objects;299300			private readonly Func<string, Func<string>, CancellationToken, System.Threading.Tasks.Task> _checkPropertyReferences;301302			[GeneratedRegex(/*Could not decode attribute arguments.*/)]303			[GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.2411")]304			private static Regex _CreateRegPattern()305			{306				return (Regex)(object)_003CRegexGenerator_g_003EFA73FC6CFD677701DCA1A03CD1AD915CEEE4D1FAECFED9B5235F6E88FF541B60F___CreateRegPattern_5.Instance;307			}308309			[GeneratedRegex(/*Could not decode attribute arguments.*/)]310			[GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.2411")]311			private static Regex _CreateRegVersion()312			{313				return (Regex)(object)_003CRegexGenerator_g_003EFA73FC6CFD677701DCA1A03CD1AD915CEEE4D1FAECFED9B5235F6E88FF541B60F___CreateRegVersion_6.Instance;314			}315316			public _ValueReplacer(IMetaData metaData, IMetaTable baseTable, _DataObject dataObject, _PreloadData objects, Func<string, Func<string>, CancellationToken, System.Threading.Tasks.Task> checkPropertyReferences)317			{318				_metaData = metaData;319				_baseTable = baseTable;320				_dataObject = dataObject;321				_objects = objects;322				_checkPropertyReferences = checkPropertyReferences;323			}324325			public System.Threading.Tasks.Task<string> ReplaceAsync(string input, CancellationToken ct)326			{327				//IL_001e: Unknown result type (might be due to invalid IL or missing references)328				string input2 = ((Dictionary<string, string>)_code)[input];329				return _regPattern.ReplaceAsync(input2, _ReplaceMatchAsync, ct);330			}331332			[AsyncStateMachine(typeof(_003C_ReplaceMatchAsync_003Ed__11))]333			private async System.Threading.Tasks.Task<string> _ReplaceMatchAsync(Match m, CancellationToken ct)334			{335				//IL_0002: Unknown result type (might be due to invalid IL or missing references)336				//IL_0007: Unknown result type (might be due to invalid IL or missing references)337				//IL_001e: Unknown result type (might be due to invalid IL or missing references)338				//IL_001f: Unknown result type (might be due to invalid IL or missing references)339				string valueName = ((Capture)m.Groups["value"]).Value;340				Group val = m.Groups["format"];341				if (string.Equals(valueName, "ObjectKey", (StringComparison)5))342				{343					return _CreateObjectKey(_baseTable, _dataObject).ToXmlString();344				}345				object val2 = _GetValue(valueName);346				if (!val.Success)347				{348					return DbVal.ConvertTo<string>(val2);349				}350				string text = ((Capture)val).Value.ToLowerInvariant();351				if (text != null)352				{353					switch (text.Length)354					{355					case 2:356						switch (text[0])357						{358						case 'f':359							if (!(text == "fn"))360							{361								break;362							}363							return FunctionName.Create(DbVal.ConvertTo<string>(val2));364						case 'l':365							if (!(text == "ld"))366							{367								break;368							}369							await _checkPropertyReferences.Invoke(DbVal.ConvertTo<string>(val2), (Func<string>)(() => _GetPropertyDisplay(_baseTable, _dataObject, valueName)), ct).ConfigureAwait(false);370							return ScriptSyntax.ReplaceLanguageDependentExpressions(_baseTable.Tablename, valueName, DbVal.ConvertTo<string>(val2));371						case 'c':372						{373							if (!(text == "cd"))374							{375								break;376							}377							IMetaColumn value;378							return (_baseTable.Columns.TryGetValue(valueName, out value) ? value.Display.Translated : valueName).Replace("\"", "\"\"");379						}380						}381						break;382					case 3:383						if (!(text == "int"))384						{385							break;386						}387						return DbVal.ConvertTo<int>(val2).ToString((IFormatProvider)(object)CultureInfo.InvariantCulture);388					case 4:389						if (!(text == "bool"))390						{391							break;392						}393						return DbVal.ConvertTo<bool>(val2) ? "True" : "False";394					case 7:395					{396						if (!(text == "version"))397						{398							break;399						}400						int[] array = new int[4];401						Match val3 = _regVersion.Match(DbVal.ConvertTo<string>(val2));402						if (((Group)val3).Success)403						{404							for (int num = 0; num < 4; num++)405							{406								array[num] = int.Parse(((Capture)val3.Groups[num + 1]).Value);407							}408							CultureInfo invariantCulture = CultureInfo.InvariantCulture;409							global::_003C_003Ey__InlineArray4<object> buffer = default(global::_003C_003Ey__InlineArray4<object>);410							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 0) = array[0];411							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 1) = array[1];412							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 2) = array[2];413							global::_003CPrivateImplementationDetails_003E.InlineArrayElementRef<global::_003C_003Ey__InlineArray4<object>, object>(ref buffer, 3) = array[3];414							return string.Format((IFormatProvider)(object)invariantCulture, "{0}.{1}.{2}.{3}", global::_003CPrivateImplementationDetails_003E.InlineArrayAsReadOnlySpan<global::_003C_003Ey__InlineArray4<object>, object>(in buffer, 4));415						}416						return DbVal.ConvertTo<string>(val2);417					}418					case 6:419						if (!(text == "string"))420						{421							break;422						}423						return DbVal.ConvertTo<string>(val2).Replace("\"", "\"\"").Replace("\ufffd", "\"\"")424							.Replace("\ufffd", "\"\"");425					}426				}427				return DbVal.ConvertTo<string>(val2);428			}429430			private string _GetPropertyDisplay(IMetaTable table, _DataObject dataObject, string valueName)431			{432				DbObjectKey dbObjectKey = _CreateObjectKey(table, dataObject);433				if (dataObject.TryGetValue("_display", out object value))434				{435					return $"{table.Display.Translated} - {value} - {valueName}";436				}437				return $"{table.Display.Translated} ({dbObjectKey.ToXmlString()}) - {valueName}";438			}439440			public T GetValue<T>(string definition)441			{442				return DbVal.ConvertTo<T>(_GetValue(definition));443			}444445			private object? _GetValue(string definition)446			{447				IMetaColumn[] path = _metaData.GetPath(_baseTable.Tablename, definition);448				Match val = ScriptSyntax.DollarExpression.Match(definition);449				ValType theType = ValType.String;450				if (((Group)val).Success && ((Capture)val.Groups["type"]).Length > 0)451				{452					theType = System.Enum.Parse<ValType>(((Capture)val.Groups["type"]).Value);453				}454				IMetaTable metaTable = _baseTable;455				_DataObject dataObject = _dataObject;456				int i;457				for (i = 0; i < path.Length - 1; i++)458				{459					string columnname = path[i].Columnname;460					if (!metaTable.Columns.TryGetValue(columnname, out var value))461					{462						throw new System.Exception($"Column {columnname} not found in expression {definition}.");463					}464					if (!value.IsFK)465					{466						throw new System.Exception($"Column {columnname} in expression {definition} is no foreign key.");467					}468					if (!dataObject.TryGetValue(columnname, out object value2))469					{470						throw new System.Exception($"Column {columnname} in expression {definition}: value was not found in preloaded data.");471					}472					string text = DbVal.ConvertTo<string>(value2);473					if (string.IsNullOrEmpty(text))474					{475						return null;476					}477					metaTable = value.GetFKRelation().GetParentTable();478					dataObject = _objects.Get(metaTable.Tablename, text);479				}480				if (dataObject == null || !dataObject.TryGetValue(path[i].Columnname, out object value3))481				{482					return DbVal.ConvertTo(null, theType);483				}484				return DbVal.ConvertTo(value3, theType, (IFormatProvider?)(object)IsoInvariantCulture.Culture);485			}486		}487488		[DefaultMember("Item")]489		private class _DataObject490		{491			private readonly Dictionary<string, object> _values;492493			public object this[string name]494			{495				get496				{497					return _values[name];498				}499				set500				{501					_values[name] = value;502				}503			}504505			public _DataObject()506			{507				_values = new Dictionary<string, object>((IEqualityComparer<string>)(object)StringComparer.OrdinalIgnoreCase);508			}509510			public T GetValue<T>(string name)511			{512				return DbVal.ConvertTo<T>(this[name]);513			}514515			public bool TryGetValue(string name, out object? value)516			{517				return _values.TryGetValue(name, ref value);518			}519		}520521		private class _PreloadData522		{523			private readonly Dictionary<string, Dictionary<DbObjectKey, _DataObject>> _tables = new Dictionary<string, Dictionary<DbObjectKey, _DataObject>>();524525			public _DataObject Get(string? table, string? pkValue)526			{527				if (!TryGetValue(table, pkValue, out _DataObject obj) || obj == null)528				{529					throw new System.Exception($"The object in '{table}' with key '{pkValue}' was not found in the preloaded data.");530				}531				return obj;532			}533534			public bool TryGetValue(DbObjectKey? key, out _DataObject? obj)535			{536				Dictionary<DbObjectKey, _DataObject> val = default(Dictionary<DbObjectKey, _DataObject>);537				if (key == null || key.Tablename == null || !_tables.TryGetValue(key.Tablename, ref val))538				{539					obj = null;540					return false;541				}542				return val.TryGetValue(key, ref obj);543			}544545			public bool TryGetValue(string? table, string? pkValue, out _DataObject? obj)546			{547				Dictionary<DbObjectKey, _DataObject> val = default(Dictionary<DbObjectKey, _DataObject>);548				if (table == null || pkValue == null || !_tables.TryGetValue(table, ref val))549				{550					obj = null;551					return false;552				}553				return val.TryGetValue(new DbObjectKey(table, pkValue), ref obj);554			}555556			public Dictionary<DbObjectKey, _DataObject> TableData(string tablename)557			{558				return ((IDictionary<string, Dictionary<DbObjectKey, _DataObject>>)(object)_tables).GetOrAdd<string, Dictionary<DbObjectKey, _DataObject>>(tablename, (string _) => new Dictionary<DbObjectKey, _DataObject>());559			}560		}561562		[CompilerGenerated]563		private sealed class _003C_003Ec__DisplayClass15_0564		{565			public string noLock;566567			internal string _003CGetVersionHashAsync_003Eb__0(_PreloadTable t)568			{569				if (string.IsNullOrEmpty(t.Where))570				{571					return "select max(xdateupdated), count(*) from " + t.Table + " " + noLock;572				}573				return $"select max(xdateupdated), count(*) from {t.Table} {noLock} where {t.Where}";574			}575		}576577		[CompilerGenerated]578		private sealed class _003C_003Ec__DisplayClass22_0579		{580			public string uidTable;581582			public Dictionary<string, _DataObject> qbmEvents;583584			public JobsAssemblyGenerator _003C_003E4__this;585586			public ScriptCompilerOptions options;587588			public string tableName;589590			internal bool _003C_GenerateEventsAsync_003Eb__0(KeyValuePair<DbObjectKey, _DataObject> e)591			{592				return string.Equals(e.Value.GetValue<string>("UID_DialogTable"), uidTable, (StringComparison)4);593			}594595			internal bool _003C_GenerateEventsAsync_003Eb__3(KeyValuePair<DbObjectKey, _DataObject> e)596			{597				return qbmEvents.ContainsKey(e.Value.GetValue<string>("UID_QBMEvent"));598			}599600			internal bool _003C_GenerateEventsAsync_003Eb__5(_DataObject evt)601			{602				if (!_003C_003E4__this._preloadData.TryGetValue("JobChain", evt.GetValue<string>("UID_JobChain"), out _DataObject obj) || obj == null)603				{604					return false;605				}606				return !obj.GetValue<bool>("NoGenerate");607			}608609			internal _003C_003Ef__AnonymousType8<_DataObject, _DataObject, global::_003C_003Ef__AnonymousType9<DbObjectKey, string>> _003C_GenerateEventsAsync_003Eb__6(_DataObject e)610			{611				_DataObject qBMEvent = default(_DataObject);612				qbmEvents.TryGetValue(e.GetValue<string>("UID_QBMEvent"), ref qBMEvent);613				DbObjectKey key = new DbObjectKey("JobChain", e.GetValue<string>("UID_JobChain"));614				string name = "";615				if (_003C_003E4__this._preloadData.TryGetValue(key, out _DataObject obj) && obj != null)616				{617					name = obj.GetValue<string>("Name");618				}619				return new620				{621					JobEventGen = e,622					QBMEvent = qBMEvent,623					Chain = new624					{625						Key = key,626						Name = name627					}628				};629			}630		}631632		[CompilerGenerated]633		private sealed class _003C_003Ec__DisplayClass22_1634		{635			public Func<string> getDisplay;636637			internal System.Exception _003C_GenerateEventsAsync_003Eb__11(System.Exception ex)638			{639				return (System.Exception)(object)new ViException(57335005, ExceptionRelevance.EndUser, ex, getDisplay.Invoke());640			}641		}642643		[StructLayout((LayoutKind)3)]644		[CompilerGenerated]645		private struct _003CGenerateSourceAndReferencesAsync_003Ed__16 : IAsyncStateMachine646		{647			public int _003C_003E1__state;648649			public AsyncTaskMethodBuilder<ScriptProject> _003C_003Et__builder;650651			public IDbSession dbSession;652653			public ScriptCompilerOptions options;654655			public IConfiguration config;656657			public CancellationToken ct;658659			public IMetaData meta;660661			private ScriptCompilerOptions _003CmyOptions_003E5__2;662663			private List<SourceFile> _003Csources_003E5__3;664665			private HashSet<AssemblyReference> _003CassemblyReferences_003E5__4;666667			private HashSet<NuGetReference> _003CnugetReferences_003E5__5;668669			private string _003CscriptingId_003E5__6;670671			private string[] _003CpreprocDefines_003E5__7;672673			private BinaryExpressionParser _003CpreprocParser_003E5__8;674675			private JobsAssemblyGenerator _003Cgen_003E5__9;676677			private ConfiguredTaskAwaiter<string[]> _003C_003Eu__1;678679			private ConfiguredTaskAwaiter<_PreloadData> _003C_003Eu__2;680681			private _DataObject[] _003C_003E7__wrap9;682683			private int _003C_003E7__wrap10;684685			private string _003Ctablename_003E5__12;686687			private ConfiguredTaskAwaiter<string> _003C_003Eu__3;688689			private void MoveNext()690			{691				//IL_00ee: Unknown result type (might be due to invalid IL or missing references)692				//IL_00f3: Unknown result type (might be due to invalid IL or missing references)693				//IL_00fb: Unknown result type (might be due to invalid IL or missing references)694				//IL_0187: Unknown result type (might be due to invalid IL or missing references)695				//IL_018c: Unknown result type (might be due to invalid IL or missing references)696				//IL_0194: Unknown result type (might be due to invalid IL or missing references)697				//IL_025c: Unknown result type (might be due to invalid IL or missing references)698				//IL_0261: Unknown result type (might be due to invalid IL or missing references)699				//IL_0269: Unknown result type (might be due to invalid IL or missing references)700				//IL_013e: Unknown result type (might be due to invalid IL or missing references)701				//IL_0149: Unknown result type (might be due to invalid IL or missing references)702				//IL_014e: Unknown result type (might be due to invalid IL or missing references)703				//IL_0152: Unknown result type (might be due to invalid IL or missing references)704				//IL_0157: Unknown result type (might be due to invalid IL or missing references)705				//IL_0026: Unknown result type (might be due to invalid IL or missing references)706				//IL_016c: Unknown result type (might be due to invalid IL or missing references)707				//IL_016e: Unknown result type (might be due to invalid IL or missing references)708				//IL_02ca: Unknown result type (might be due to invalid IL or missing references)709				//IL_02ea: Expected O, but got Unknown710				//IL_00a5: Unknown result type (might be due to invalid IL or missing references)711				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)712				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)713				//IL_00b9: Unknown result type (might be due to invalid IL or missing references)714				//IL_00be: Unknown result type (might be due to invalid IL or missing references)715				//IL_0039: Unknown result type (might be due to invalid IL or missing references)716				//IL_0213: Unknown result type (might be due to invalid IL or missing references)717				//IL_021e: Unknown result type (might be due to invalid IL or missing references)718				//IL_0223: Unknown result type (might be due to invalid IL or missing references)719				//IL_0227: Unknown result type (might be due to invalid IL or missing references)720				//IL_022c: Unknown result type (might be due to invalid IL or missing references)721				//IL_0434: Unknown result type (might be due to invalid IL or missing references)722				//IL_0439: Unknown result type (might be due to invalid IL or missing references)723				//IL_04cd: Unknown result type (might be due to invalid IL or missing references)724				//IL_04d7: Expected O, but got Unknown725				//IL_00d3: Unknown result type (might be due to invalid IL or missing references)726				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)727				//IL_0241: Unknown result type (might be due to invalid IL or missing references)728				//IL_0243: Unknown result type (might be due to invalid IL or missing references)729				int num = _003C_003E1__state;730				ScriptProject result;731				try732				{733					ConfiguredTaskAwaiter<string[]> val3;734					ConfiguredTaskAwaiter<_PreloadData> val2;735					ConfiguredTaskAwaiter<string> val;736					System.DateTime now;737					TimeSpan val4;738					int days;739					int num2;740					string[] result2;741					string result3;742					_PreloadData result4;743					_DataObject[] array;744					switch (num)745					{746					default:747						if (dbSession == null)748						{749							throw new ArgumentNullException("dbSession");750						}751						if (options == null)752						{753							throw new ArgumentNullException("options");754						}755						_003CmyOptions_003E5__2 = options.Clone();756						_003CmyOptions_003E5__2.ScriptLanguage = new VbScriptLanguage(new ScriptOptions757						{758							NoVersionInHeader = true759						});760						_003Csources_003E5__3 = new List<SourceFile>();761						_003CassemblyReferences_003E5__4 = new HashSet<AssemblyReference>();762						_003CnugetReferences_003E5__5 = new HashSet<NuGetReference>();763						_003CscriptingId_003E5__6 = dbSession.GetUniqueScriptingId();764						val3 = config.GetPreprocessorDefinesAsync(ct).ConfigureAwait(false).GetAwaiter();765						if (!val3.IsCompleted)766						{767							num = (_003C_003E1__state = 0);768							_003C_003Eu__1 = val3;769							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string[]>, _003CGenerateSourceAndReferencesAsync_003Ed__16>(ref val3, ref this);770							return;771						}772						goto IL_010a;773					case 0:774						val3 = _003C_003Eu__1;775						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<string[]>);776						num = (_003C_003E1__state = -1);777						goto IL_010a;778					case 1:779						val2 = _003C_003Eu__2;780						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<_PreloadData>);781						num = (_003C_003E1__state = -1);782						goto IL_01a3;783					case 2:784						{785							val = _003C_003Eu__3;786							_003C_003Eu__3 = default(ConfiguredTaskAwaiter<string>);787							num = (_003C_003E1__state = -1);788							goto IL_0278;789						}790						IL_0405:791						if (_003C_003E7__wrap10 < _003C_003E7__wrap9.Length)792						{793							_DataObject dataObject = _003C_003E7__wrap9[_003C_003E7__wrap10];794							_003Ctablename_003E5__12 = dataObject.GetValue<string>("Tablename");795							val = _003Cgen_003E5__9._GenerateEventsAsync(dataObject, options, ct).ConfigureAwait(false).GetAwaiter();796							if (!val.IsCompleted)797							{798								num = (_003C_003E1__state = 2);799								_003C_003Eu__3 = val;800								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003CGenerateSourceAndReferencesAsync_003Ed__16>(ref val, ref this);801								return;802							}803							goto IL_0278;804						}805						_003C_003E7__wrap9 = null;806						now = System.DateTime.Now;807						val4 = now - new System.DateTime(2000, 1, 1);808						days = ((TimeSpan)(ref val4)).Days;809						num2 = (now.Second + now.Minute * 60 + now.Hour * 3600) / 2;810						result = new ScriptProject811						{812							Name = "Jobs",813							AssemblyName = "Jobs_" + dbSession.GetUniqueScriptingId(),814							AssemblyReferences = Enumerable.ToArray<AssemblyReference>((System.Collections.Generic.IEnumerable<AssemblyReference>)_003CassemblyReferences_003E5__4),815							NuGetReferences = Enumerable.ToArray<NuGetReference>((System.Collections.Generic.IEnumerable<NuGetReference>)_003CnugetReferences_003E5__5),816							SourceFiles = _003Csources_003E5__3.ToArray(),817							Version = new Version(1, 0, days, num2)818						};819						break;820						IL_010a:821						result2 = val3.GetResult();822						_003CpreprocDefines_003E5__7 = result2;823						_003CpreprocParser_003E5__8 = new BinaryExpressionParser(System.ReadOnlySpan<string>.op_Implicit(_003CpreprocDefines_003E5__7));824						val2 = _PreloadDataAsync(dbSession, meta, ct).ConfigureAwait(false).GetAwaiter();825						if (!val2.IsCompleted)826						{827							num = (_003C_003E1__state = 1);828							_003C_003Eu__2 = val2;829							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<_PreloadData>, _003CGenerateSourceAndReferencesAsync_003Ed__16>(ref val2, ref this);830							return;831						}832						goto IL_01a3;833						IL_0278:834						result3 = val.GetResult();835						if (!string.IsNullOrEmpty(result3))836						{837							ScriptCompiler scriptCompiler = new ScriptCompiler(_003CmyOptions_003E5__2.QualifyNameWithSuffix("JobGen_" + _003Ctablename_003E5__12, _003CscriptingId_003E5__6), _003CmyOptions_003E5__2, new TypeReference(new AssemblyName(_003CmyOptions_003E5__2.QualifyNameWithSuffix("Scripts", _003CscriptingId_003E5__6)), _003CmyOptions_003E5__2.QualifyNameWithSuffix("DynScripts.Scripts", _003CscriptingId_003E5__6)));838							((System.Collections.Generic.ICollection<string>)scriptCompiler.Imports).Add("VI.DB.JobGeneration");839							((System.Collections.Generic.ICollection<string>)scriptCompiler.Imports).Add("JP = VI.Base.JobProcessing");840							((System.Collections.Generic.ICollection<string>)scriptCompiler.Imports).Add("System.IO");841							scriptCompiler.AddClassContent("JobGen_" + _003Ctablename_003E5__12, result3);842							ScriptSourceAndReferences scriptSourceAndReferences = scriptCompiler.GenerateSourceAndReferences(_003CpreprocDefines_003E5__7);843							System.Collections.Generic.IEnumerator<AssemblyReference> enumerator = scriptSourceAndReferences.AssemblyReferences.AvoidNull().GetEnumerator();844							try845							{846								while (((System.Collections.IEnumerator)enumerator).MoveNext())847								{848									AssemblyReference current = enumerator.Current;849									_003CassemblyReferences_003E5__4.Add(current);850								}851							}852							finally853							{854								if (num < 0)855								{856									((System.IDisposable)enumerator)?.Dispose();857								}858							}859							System.Collections.Generic.IEnumerator<NuGetReference> enumerator2 = scriptSourceAndReferences.NuGetReferences.AvoidNull().GetEnumerator();860							try861							{862								while (((System.Collections.IEnumerator)enumerator2).MoveNext())863								{864									NuGetReference current2 = enumerator2.Current;865									_003CnugetReferences_003E5__5.Add(current2);866								}867							}868							finally869							{870								if (num < 0)871								{872									((System.IDisposable)enumerator2)?.Dispose();873								}874							}875							_003Csources_003E5__3.Add(scriptSourceAndReferences.SourceFile);876							((CancellationToken)(ref ct)).ThrowIfCancellationRequested();877							_003Ctablename_003E5__12 = null;878						}879						_003C_003E7__wrap10++;880						goto IL_0405;881						IL_01a3:882						result4 = val2.GetResult();883						_003Cgen_003E5__9 = new JobsAssemblyGenerator(meta, config, result4, _003CpreprocParser_003E5__8);884						array = _GetChainTables(result4);885						_003C_003E7__wrap9 = array;886						_003C_003E7__wrap10 = 0;887						goto IL_0405;888					}889				}890				catch (System.Exception exception)891				{892					_003C_003E1__state = -2;893					_003CmyOptions_003E5__2 = null;894					_003Csources_003E5__3 = null;895					_003CassemblyReferences_003E5__4 = null;896					_003CnugetReferences_003E5__5 = null;897					_003CscriptingId_003E5__6 = null;898					_003CpreprocDefines_003E5__7 = null;899					_003CpreprocParser_003E5__8 = null;900					_003Cgen_003E5__9 = null;901					_003C_003Et__builder.SetException(exception);902					return;903				}904				_003C_003E1__state = -2;905				_003CmyOptions_003E5__2 = null;906				_003Csources_003E5__3 = null;907				_003CassemblyReferences_003E5__4 = null;908				_003CnugetReferences_003E5__5 = null;909				_003CscriptingId_003E5__6 = null;910				_003CpreprocDefines_003E5__7 = null;911				_003CpreprocParser_003E5__8 = null;912				_003Cgen_003E5__9 = null;913				_003C_003Et__builder.SetResult(result);914			}915916			[DebuggerHidden]917			private void SetStateMachine(IAsyncStateMachine stateMachine)918			{919				_003C_003Et__builder.SetStateMachine(stateMachine);920			}921		}922923		[StructLayout((LayoutKind)3)]924		[CompilerGenerated]925		private struct _003CGetVersionHashAsync_003Ed__15 : IAsyncStateMachine926		{927			public int _003C_003E1__state;928929			public AsyncTaskMethodBuilder<string> _003C_003Et__builder;930931			public IDbSession dbSession;932933			public CancellationToken ct;934935			private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__1;936937			private void MoveNext()938			{939				//IL_00aa: Unknown result type (might be due to invalid IL or missing references)940				//IL_00af: Unknown result type (might be due to invalid IL or missing references)941				//IL_00b7: Unknown result type (might be due to invalid IL or missing references)942				//IL_0061: Unknown result type (might be due to invalid IL or missing references)943				//IL_006c: Unknown result type (might be due to invalid IL or missing references)944				//IL_0071: Unknown result type (might be due to invalid IL or missing references)945				//IL_0075: Unknown result type (might be due to invalid IL or missing references)946				//IL_007a: Unknown result type (might be due to invalid IL or missing references)947				//IL_008f: Unknown result type (might be due to invalid IL or missing references)948				//IL_0091: Unknown result type (might be due to invalid IL or missing references)949				int num = _003C_003E1__state;950				string result;951				try952				{953					ConfiguredTaskAwaiter<DbDataReader> val;954					if (num != 0)955					{956						_003C_003Ec__DisplayClass15_0 CS_0024_003C_003E8__locals2 = new _003C_003Ec__DisplayClass15_0957						{958							noLock = SqlStrings.GetString(dbSession.SystemIdentifier, "NoLock")959						};960						System.Collections.Generic.IEnumerable<string> enumerable = Enumerable.Select<_PreloadTable, string>((System.Collections.Generic.IEnumerable<_PreloadTable>)_GetPreloadTables(dbSession), (Func<_PreloadTable, string>)((_PreloadTable t) => (!string.IsNullOrEmpty(t.Where)) ? $"select max(xdateupdated), count(*) from {t.Table} {CS_0024_003C_003E8__locals2.noLock} where {t.Where}" : ("select max(xdateupdated), count(*) from " + t.Table + " " + CS_0024_003C_003E8__locals2.noLock)));961						string sqlStatement = string.Join(" union ", enumerable);962						val = dbSession.SqlExecuteAsync(sqlStatement, ct).ConfigureAwait(false).GetAwaiter();963						if (!val.IsCompleted)964						{965							num = (_003C_003E1__state = 0);966							_003C_003Eu__1 = val;967							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003CGetVersionHashAsync_003Ed__15>(ref val, ref this);968							return;969						}970					}971					else972					{973						val = _003C_003Eu__1;974						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<DbDataReader>);975						num = (_003C_003E1__state = -1);976					}977					result = VersionHash.Compute(Enumerable.Select<IDataRecord, ValueTuple<System.DateTime, int>>(((IDataReader)(object)val.GetResult()).FetchAll(), (Func<IDataRecord, ValueTuple<System.DateTime, int>>)((IDataRecord r) => new ValueTuple<System.DateTime, int>(r.GetDateTime(0), r.GetInt32(1)))));978				}979				catch (System.Exception exception)980				{981					_003C_003E1__state = -2;982					_003C_003Et__builder.SetException(exception);983					return;984				}985				_003C_003E1__state = -2;986				_003C_003Et__builder.SetResult(result);987			}988989			[DebuggerHidden]990			private void SetStateMachine(IAsyncStateMachine stateMachine)991			{992				_003C_003Et__builder.SetStateMachine(stateMachine);993			}994		}995996		[StructLayout((LayoutKind)3)]997		[CompilerGenerated]998		private struct _003C_BufferObjectsAsync_003Ed__20 : IAsyncStateMachine999		{1000			public int _003C_003E1__state;10011002			public AsyncTaskMethodBuilder _003C_003Et__builder;10031004			public IMetaData meta;10051006			public string tablename;10071008			public CancellationToken ct;10091010			public _PreloadData data;10111012			public string[] columns;10131014			public string displayColumn;10151016			public string whereClause;10171018			public IDbSession dbSession;10191020			private IMetaTable _003Ctable_003E5__2;10211022			private Dictionary<DbObjectKey, _DataObject> _003CtableEntries_003E5__3;10231024			private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__1;10251026			private ConfiguredTaskAwaiter<DbDataReader> _003C_003Eu__2;10271028			private void MoveNext()1029			{1030				//IL_0067: Unknown result type (might be due to invalid IL or missing references)1031				//IL_006c: Unknown result type (might be due to invalid IL or missing references)1032				//IL_0074: Unknown result type (might be due to invalid IL or missing references)1033				//IL_00b3: Unknown result type (might be due to invalid IL or missing references)1034				//IL_00b9: Expected O, but got Unknown1035				//IL_01b0: Unknown result type (might be due to invalid IL or missing references)1036				//IL_01b5: Unknown result type (might be due to invalid IL or missing references)1037				//IL_01bd: Unknown result type (might be due to invalid IL or missing references)1038				//IL_001e: Unknown result type (might be due to invalid IL or missing references)1039				//IL_0029: Unknown result type (might be due to invalid IL or missing references)1040				//IL_002e: Unknown result type (might be due to invalid IL or missing references)1041				//IL_0032: Unknown result type (might be due to invalid IL or missing references)1042				//IL_0037: Unknown result type (might be due to invalid IL or missing references)1043				//IL_004c: Unknown result type (might be due to invalid IL or missing references)1044				//IL_004e: Unknown result type (might be due to invalid IL or missing references)1045				//IL_0167: Unknown result type (might be due to invalid IL or missing references)1046				//IL_0172: Unknown result type (might be due to invalid IL or missing references)1047				//IL_0177: Unknown result type (might be due to invalid IL or missing references)1048				//IL_017b: Unknown result type (might be due to invalid IL or missing references)1049				//IL_0180: Unknown result type (might be due to invalid IL or missing references)1050				//IL_0195: Unknown result type (might be due to invalid IL or missing references)1051				//IL_0197: Unknown result type (might be due to invalid IL or missing references)1052				int num = _003C_003E1__state;1053				try1054				{1055					ConfiguredTaskAwaiter<DbDataReader> val;1056					ConfiguredTaskAwaiter<IMetaTable> val2;1057					if (num != 0)1058					{1059						if (num == 1)1060						{1061							val = _003C_003Eu__2;1062							_003C_003Eu__2 = default(ConfiguredTaskAwaiter<DbDataReader>);1063							num = (_003C_003E1__state = -1);1064							goto IL_01cc;1065						}1066						val2 = meta.GetTableAsync(tablename, ct).ConfigureAwait(false).GetAwaiter();1067						if (!val2.IsCompleted)1068						{1069							num = (_003C_003E1__state = 0);1070							_003C_003Eu__1 = val2;1071							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_BufferObjectsAsync_003Ed__20>(ref val2, ref this);1072							return;1073						}1074					}1075					else1076					{1077						val2 = _003C_003Eu__1;1078						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IMetaTable>);1079						num = (_003C_003E1__state = -1);1080					}1081					IMetaTable result = val2.GetResult();1082					_003Ctable_003E5__2 = result;1083					_003CtableEntries_003E5__3 = data.TableData(_003Ctable_003E5__2.Tablename);1084					StringBuilder val3 = new StringBuilder("select ");1085					for (int i = 0; i < columns.Length; i++)1086					{1087						if (i > 0)1088						{1089							val3.Append(", ");1090						}1091						val3.Append(columns[i]);1092					}1093					if (!string.IsNullOrEmpty(displayColumn))1094					{1095						val3.Append(", ").Append(displayColumn).Append(" as _display");1096					}1097					val3.Append(" from ").Append(tablename);1098					if (!string.IsNullOrWhiteSpace(whereClause))1099					{1100						val3.Append(" where ").Append(whereClause);1101					}1102					val = dbSession.SqlExecuteAsync(((object)val3).ToString(), ct).ConfigureAwait(false).GetAwaiter();1103					if (!val.IsCompleted)1104					{1105						num = (_003C_003E1__state = 1);1106						_003C_003Eu__2 = val;1107						((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<DbDataReader>, _003C_BufferObjectsAsync_003Ed__20>(ref val, ref this);1108						return;1109					}1110					goto IL_01cc;1111					IL_01cc:1112					System.Collections.Generic.IEnumerable<_DataObject> enumerable = Enumerable.Select<IDataRecord, _DataObject>(((IDataReader)(object)val.GetResult()).FetchAll(), (Func<IDataRecord, _DataObject>)_ToDataObject);1113					if (((System.Collections.Generic.IReadOnlyCollection<IMetaColumn>)_003Ctable_003E5__2.PrimaryKeyColumns).Count == 1)1114					{1115						string columnname = _003Ctable_003E5__2.PrimaryKeyColumns[0].Columnname;1116						System.Collections.Generic.IEnumerator<_DataObject> enumerator = enumerable.GetEnumerator();1117						try1118						{1119							while (((System.Collections.IEnumerator)enumerator).MoveNext())1120							{1121								_DataObject current = enumerator.Current;1122								_003CtableEntries_003E5__3[new DbObjectKey(tablename, DbVal.ConvertTo<string>(current[columnname]))] = current;1123							}1124						}1125						finally1126						{1127							if (num < 0)1128							{1129								((System.IDisposable)enumerator)?.Dispose();1130							}1131						}1132					}1133					else1134					{1135						System.Collections.Generic.IEnumerator<_DataObject> enumerator = enumerable.GetEnumerator();1136						try1137						{1138							while (((System.Collections.IEnumerator)enumerator).MoveNext())1139							{1140								_DataObject current2 = enumerator.Current;1141								_003CtableEntries_003E5__3[new DbObjectKey(DbVal.ConvertTo<string>(current2["xobjectkey"]))] = current2;1142							}1143						}1144						finally1145						{1146							if (num < 0)1147							{1148								((System.IDisposable)enumerator)?.Dispose();1149							}1150						}1151					}1152				}1153				catch (System.Exception exception)1154				{1155					_003C_003E1__state = -2;1156					_003Ctable_003E5__2 = null;1157					_003CtableEntries_003E5__3 = null;1158					((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1159					return;1160				}1161				_003C_003E1__state = -2;1162				_003Ctable_003E5__2 = null;1163				_003CtableEntries_003E5__3 = null;1164				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1165			}11661167			[DebuggerHidden]1168			private void SetStateMachine(IAsyncStateMachine stateMachine)1169			{1170				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1171			}1172		}11731174		[StructLayout((LayoutKind)3)]1175		[CompilerGenerated]1176		private struct _003C_GenerateChainAsync_003Ed__23 : IAsyncStateMachine1177		{1178			public int _003C_003E1__state;11791180			public AsyncTaskMethodBuilder _003C_003Et__builder;11811182			public JobsAssemblyGenerator _003C_003E4__this;11831184			public DbObjectKey chainKey;11851186			public CancellationToken ct;11871188			public Func<string, Func<string>, CancellationToken, System.Threading.Tasks.Task> checkPropertyReferences;11891190			public StringBuilder code;11911192			private _DataObject _003Cchain_003E5__2;11931194			private _ValueReplacer _003Crep_003E5__3;11951196			private bool _003ChasCondition_003E5__4;11971198			private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__1;11991200			private StringBuilder _003C_003E7__wrap4;12011202			private ConfiguredTaskAwaiter<string> _003C_003Eu__2;12031204			private ConfiguredTaskAwaiter _003C_003Eu__3;12051206			private void MoveNext()1207			{1208				//IL_00b7: Unknown result type (might be due to invalid IL or missing references)1209				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)1210				//IL_00c4: Unknown result type (might be due to invalid IL or missing references)1211				//IL_0183: Unknown result type (might be due to invalid IL or missing references)1212				//IL_0188: Unknown result type (might be due to invalid IL or missing references)1213				//IL_0190: Unknown result type (might be due to invalid IL or missing references)1214				//IL_0239: Unknown result type (might be due to invalid IL or missing references)1215				//IL_023e: Unknown result type (might be due to invalid IL or missing references)1216				//IL_0246: Unknown result type (might be due to invalid IL or missing references)1217				//IL_02df: Unknown result type (might be due to invalid IL or missing references)1218				//IL_02e4: Unknown result type (might be due to invalid IL or missing references)1219				//IL_02ec: Unknown result type (might be due to invalid IL or missing references)1220				//IL_0390: Unknown result type (might be due to invalid IL or missing references)1221				//IL_0395: Unknown result type (might be due to invalid IL or missing references)1222				//IL_039d: Unknown result type (might be due to invalid IL or missing references)1223				//IL_042b: Unknown result type (might be due to invalid IL or missing references)1224				//IL_0430: Unknown result type (might be due to invalid IL or missing references)1225				//IL_0438: Unknown result type (might be due to invalid IL or missing references)1226				//IL_04d1: Unknown result type (might be due to invalid IL or missing references)1227				//IL_04d6: Unknown result type (might be due to invalid IL or missing references)1228				//IL_04de: Unknown result type (might be due to invalid IL or missing references)1229				//IL_056c: Unknown result type (might be due to invalid IL or missing references)1230				//IL_0571: Unknown result type (might be due to invalid IL or missing references)1231				//IL_0579: Unknown result type (might be due to invalid IL or missing references)1232				//IL_0624: Unknown result type (might be due to invalid IL or missing references)1233				//IL_0629: Unknown result type (might be due to invalid IL or missing references)1234				//IL_0631: Unknown result type (might be due to invalid IL or missing references)1235				//IL_013a: Unknown result type (might be due to invalid IL or missing references)1236				//IL_0145: Unknown result type (might be due to invalid IL or missing references)1237				//IL_014a: Unknown result type (might be due to invalid IL or missing references)1238				//IL_014e: Unknown result type (might be due to invalid IL or missing references)1239				//IL_0153: Unknown result type (might be due to invalid IL or missing references)1240				//IL_006e: Unknown result type (might be due to invalid IL or missing references)1241				//IL_0079: Unknown result type (might be due to invalid IL or missing references)1242				//IL_007e: Unknown result type (might be due to invalid IL or missing references)1243				//IL_0082: Unknown result type (might be due to invalid IL or missing references)1244				//IL_0087: Unknown result type (might be due to invalid IL or missing references)1245				//IL_0168: Unknown result type (might be due to invalid IL or missing references)1246				//IL_016a: Unknown result type (might be due to invalid IL or missing references)1247				//IL_01f0: Unknown result type (might be due to invalid IL or missing references)1248				//IL_01fb: Unknown result type (might be due to invalid IL or missing references)1249				//IL_0200: Unknown result type (might be due to invalid IL or missing references)1250				//IL_0204: Unknown result type (might be due to invalid IL or missing references)1251				//IL_0209: Unknown result type (might be due to invalid IL or missing references)1252				//IL_03e2: Unknown result type (might be due to invalid IL or missing references)1253				//IL_03ed: Unknown result type (might be due to invalid IL or missing references)1254				//IL_03f2: Unknown result type (might be due to invalid IL or missing references)1255				//IL_03f6: Unknown result type (might be due to invalid IL or missing references)1256				//IL_03fb: Unknown result type (might be due to invalid IL or missing references)1257				//IL_0523: Unknown result type (might be due to invalid IL or missing references)1258				//IL_052e: Unknown result type (might be due to invalid IL or missing references)1259				//IL_0533: Unknown result type (might be due to invalid IL or missing references)1260				//IL_0537: Unknown result type (might be due to invalid IL or missing references)1261				//IL_053c: Unknown result type (might be due to invalid IL or missing references)1262				//IL_0488: Unknown result type (might be due to invalid IL or missing references)1263				//IL_0493: Unknown result type (might be due to invalid IL or missing references)1264				//IL_0498: Unknown result type (might be due to invalid IL or missing references)1265				//IL_049c: Unknown result type (might be due to invalid IL or missing references)1266				//IL_04a1: Unknown result type (might be due to invalid IL or missing references)1267				//IL_05db: Unknown result type (might be due to invalid IL or missing references)1268				//IL_05e6: Unknown result type (might be due to invalid IL or missing references)1269				//IL_05eb: Unknown result type (might be due to invalid IL or missing references)1270				//IL_05ef: Unknown result type (might be due to invalid IL or missing references)1271				//IL_05f4: Unknown result type (might be due to invalid IL or missing references)1272				//IL_009c: Unknown result type (might be due to invalid IL or missing references)1273				//IL_009e: Unknown result type (might be due to invalid IL or missing references)1274				//IL_0296: Unknown result type (might be due to invalid IL or missing references)1275				//IL_02a1: Unknown result type (might be due to invalid IL or missing references)1276				//IL_02a6: Unknown result type (might be due to invalid IL or missing references)1277				//IL_02aa: Unknown result type (might be due to invalid IL or missing references)1278				//IL_02af: Unknown result type (might be due to invalid IL or missing references)1279				//IL_021e: Unknown result type (might be due to invalid IL or missing references)1280				//IL_0220: Unknown result type (might be due to invalid IL or missing references)1281				//IL_0347: Unknown result type (might be due to invalid IL or missing references)1282				//IL_0352: Unknown result type (might be due to invalid IL or missing references)1283				//IL_0357: Unknown result type (might be due to invalid IL or missing references)1284				//IL_035b: Unknown result type (might be due to invalid IL or missing references)1285				//IL_0360: Unknown result type (might be due to invalid IL or missing references)1286				//IL_0410: Unknown result type (might be due to invalid IL or missing references)1287				//IL_0412: Unknown result type (might be due to invalid IL or missing references)1288				//IL_0551: Unknown result type (might be due to invalid IL or missing references)1289				//IL_0553: Unknown result type (might be due to invalid IL or missing references)1290				//IL_04b6: Unknown result type (might be due to invalid IL or missing references)1291				//IL_04b8: Unknown result type (might be due to invalid IL or missing references)1292				//IL_0609: Unknown result type (might be due to invalid IL or missing references)1293				//IL_060b: Unknown result type (might be due to invalid IL or missing references)1294				//IL_02c4: Unknown result type (might be due to invalid IL or missing references)1295				//IL_02c6: Unknown result type (might be due to invalid IL or missing references)1296				//IL_0375: Unknown result type (might be due to invalid IL or missing references)1297				//IL_0377: Unknown result type (might be due to invalid IL or missing references)1298				int num = _003C_003E1__state;1299				JobsAssemblyGenerator jobsAssemblyGenerator = _003C_003E4__this;1300				try1301				{1302					ConfiguredTaskAwaiter<IMetaTable> val3;1303					ConfiguredTaskAwaiter<string> val2;1304					ConfiguredTaskAwaiter val;1305					string value;1306					ConfiguredTaskAwaitable val4;1307					IMetaTable result2;1308					string result;1309					switch (num)1310					{1311					default:1312						if (!jobsAssemblyGenerator._chains.Contains(chainKey))1313						{1314							_003Cchain_003E5__2 = jobsAssemblyGenerator._GetReferencedObject(chainKey);1315							val3 = jobsAssemblyGenerator._metaData.GetTableAsync("JobChain", ct).ConfigureAwait(false).GetAwaiter();1316							if (!val3.IsCompleted)1317							{1318								num = (_003C_003E1__state = 0);1319								_003C_003Eu__1 = val3;1320								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_GenerateChainAsync_003Ed__23>(ref val3, ref this);1321								return;1322							}1323							goto IL_00d3;1324						}1325						goto end_IL_000e;1326					case 0:1327						val3 = _003C_003Eu__1;1328						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IMetaTable>);1329						num = (_003C_003E1__state = -1);1330						goto IL_00d3;1331					case 1:1332						val2 = _003C_003Eu__2;1333						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1334						num = (_003C_003E1__state = -1);1335						goto IL_019f;1336					case 2:1337						val2 = _003C_003Eu__2;1338						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1339						num = (_003C_003E1__state = -1);1340						goto IL_0255;1341					case 3:1342						val2 = _003C_003Eu__2;1343						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1344						num = (_003C_003E1__state = -1);1345						goto IL_02fb;1346					case 4:1347						val2 = _003C_003Eu__2;1348						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1349						num = (_003C_003E1__state = -1);1350						goto IL_03ac;1351					case 5:1352						val2 = _003C_003Eu__2;1353						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1354						num = (_003C_003E1__state = -1);1355						goto IL_0447;1356					case 6:1357						val2 = _003C_003Eu__2;1358						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1359						num = (_003C_003E1__state = -1);1360						goto IL_04ed;1361					case 7:1362						val2 = _003C_003Eu__2;1363						_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1364						num = (_003C_003E1__state = -1);1365						goto IL_0588;1366					case 8:1367						{1368							val = _003C_003Eu__3;1369							_003C_003Eu__3 = default(ConfiguredTaskAwaiter);1370							num = (_003C_003E1__state = -1);1371							goto IL_0640;1372						}1373						IL_0588:1374						result = val2.GetResult();1375						_003C_003E7__wrap4.Append(result);1376						_003C_003E7__wrap4 = null;1377						value = _003Cchain_003E5__2.GetValue<string>("UID_Job");1378						if (string.IsNullOrEmpty(value))1379						{1380							break;1381						}1382						val4 = jobsAssemblyGenerator._GenerateJobAsync(code, new DbObjectKey("Job", value), checkPropertyReferences, ct).ConfigureAwait(false);1383						val = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();1384						if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)1385						{1386							num = (_003C_003E1__state = 8);1387							_003C_003Eu__3 = val;1388							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_GenerateChainAsync_003Ed__23>(ref val, ref this);1389							return;1390						}1391						goto IL_0640;1392						IL_04ed:1393						result = val2.GetResult();1394						_003C_003E7__wrap4.Append(result);1395						_003C_003E7__wrap4 = null;1396						goto IL_050b;1397						IL_00d3:1398						result2 = val3.GetResult();1399						_003Crep_003E5__3 = new _ValueReplacer(jobsAssemblyGenerator._metaData, result2, _003Cchain_003E5__2, jobsAssemblyGenerator._preloadData, checkPropertyReferences);1400						_003ChasCondition_003E5__4 = _TrimAll(_003Cchain_003E5__2.GetValue<string>("GenCondition")).Length > 0;1401						_003C_003E7__wrap4 = code;1402						val2 = _003Crep_003E5__3.ReplaceAsync("Chain_Header", ct).ConfigureAwait(false).GetAwaiter();1403						if (!val2.IsCompleted)1404						{1405							num = (_003C_003E1__state = 1);1406							_003C_003Eu__2 = val2;1407							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1408							return;1409						}1410						goto IL_019f;1411						IL_03ac:1412						result = val2.GetResult();1413						_003C_003E7__wrap4.Append(result);1414						_003C_003E7__wrap4 = null;1415						goto IL_03ca;1416						IL_019f:1417						result = val2.GetResult();1418						_003C_003E7__wrap4.Append(result);1419						_003C_003E7__wrap4 = null;1420						if (_003Cchain_003E5__2.GetValue<string>("PreCode").Length > 0)1421						{1422							_003C_003E7__wrap4 = code;1423							val2 = _003Crep_003E5__3.ReplaceAsync("Chain_PreCode", ct).ConfigureAwait(false).GetAwaiter();1424							if (!val2.IsCompleted)1425							{1426								num = (_003C_003E1__state = 2);1427								_003C_003Eu__2 = val2;1428								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1429								return;1430							}1431							goto IL_0255;1432						}1433						goto IL_0273;1434						IL_03ca:1435						_003C_003E7__wrap4 = code;1436						val2 = _003Crep_003E5__3.ReplaceAsync("Chain_Body", ct).ConfigureAwait(false).GetAwaiter();1437						if (!val2.IsCompleted)1438						{1439							num = (_003C_003E1__state = 5);1440							_003C_003Eu__2 = val2;1441							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1442							return;1443						}1444						goto IL_0447;1445						IL_050b:1446						_003C_003E7__wrap4 = code;1447						val2 = _003Crep_003E5__3.ReplaceAsync("Chain_Footer", ct).ConfigureAwait(false).GetAwaiter();1448						if (!val2.IsCompleted)1449						{1450							num = (_003C_003E1__state = 7);1451							_003C_003Eu__2 = val2;1452							((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1453							return;1454						}1455						goto IL_0588;1456						IL_0255:1457						result = val2.GetResult();1458						_003C_003E7__wrap4.Append(result);1459						_003C_003E7__wrap4 = null;1460						goto IL_0273;1461						IL_0273:1462						if (_003ChasCondition_003E5__4)1463						{1464							_003C_003E7__wrap4 = code;1465							val2 = _003Crep_003E5__3.ReplaceAsync("Chain_GenCondition_Start", ct).ConfigureAwait(false).GetAwaiter();1466							if (!val2.IsCompleted)1467							{1468								num = (_003C_003E1__state = 3);1469								_003C_003Eu__2 = val2;1470								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1471								return;1472							}1473							goto IL_02fb;1474						}1475						goto IL_0319;1476						IL_0447:1477						result = val2.GetResult();1478						_003C_003E7__wrap4.Append(result);1479						_003C_003E7__wrap4 = null;1480						if (_003ChasCondition_003E5__4)1481						{1482							_003C_003E7__wrap4 = code;1483							val2 = _003Crep_003E5__3.ReplaceAsync("Chain_GenCondition_End", ct).ConfigureAwait(false).GetAwaiter();1484							if (!val2.IsCompleted)1485							{1486								num = (_003C_003E1__state = 6);1487								_003C_003Eu__2 = val2;1488								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1489								return;1490							}1491							goto IL_04ed;1492						}1493						goto IL_050b;1494						IL_0640:1495						((ConfiguredTaskAwaiter)(ref val)).GetResult();1496						break;1497						IL_02fb:1498						result = val2.GetResult();1499						_003C_003E7__wrap4.Append(result);1500						_003C_003E7__wrap4 = null;1501						goto IL_0319;1502						IL_0319:1503						if (_003Cchain_003E5__2.GetValue<int>("ProcessTracking") > 0)1504						{1505							_003C_003E7__wrap4 = code;1506							val2 = _003Crep_003E5__3.ReplaceAsync("Chain_ProcessTracking", ct).ConfigureAwait(false).GetAwaiter();1507							if (!val2.IsCompleted)1508							{1509								num = (_003C_003E1__state = 4);1510								_003C_003Eu__2 = val2;1511								((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateChainAsync_003Ed__23>(ref val2, ref this);1512								return;1513							}1514							goto IL_03ac;1515						}1516						goto IL_03ca;1517					}1518					jobsAssemblyGenerator._chains.Add(chainKey);1519					end_IL_000e:;1520				}1521				catch (System.Exception exception)1522				{1523					_003C_003E1__state = -2;1524					_003Cchain_003E5__2 = null;1525					_003Crep_003E5__3 = null;1526					((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);1527					return;1528				}1529				_003C_003E1__state = -2;1530				_003Cchain_003E5__2 = null;1531				_003Crep_003E5__3 = null;1532				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();1533			}15341535			[DebuggerHidden]1536			private void SetStateMachine(IAsyncStateMachine stateMachine)1537			{1538				((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);1539			}1540		}15411542		[StructLayout((LayoutKind)3)]1543		[CompilerGenerated]1544		private struct _003C_GenerateEventsAsync_003Ed__22 : IAsyncStateMachine1545		{1546			public int _003C_003E1__state;15471548			public AsyncTaskMethodBuilder<string> _003C_003Et__builder;15491550			public JobsAssemblyGenerator _003C_003E4__this;15511552			public ScriptCompilerOptions options;15531554			public CancellationToken ct;15551556			private _003C_003Ec__DisplayClass22_0 _003C_003E8__1;15571558			public _DataObject table;15591560			private StringBuilder _003Ccode_003E5__2;15611562			private string _003Cfooter_003E5__3;15631564			private string _003CeventName_003E5__4;15651566			private SortedList<string, DbObjectKey> _003CchainKeysByName_003E5__5;15671568			private IMetaTable _003CjobEventGenTable_003E5__6;15691570			private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__1;15711572			private System.Collections.Generic.IEnumerator<_003C_003Ef__AnonymousType8<_DataObject, _DataObject, global::_003C_003Ef__AnonymousType9<DbObjectKey, string>>> _003C_003E7__wrap6;15731574			private _003C_003Ef__AnonymousType8<_DataObject, _DataObject, global::_003C_003Ef__AnonymousType9<DbObjectKey, string>> _003Cevt_003E5__8;15751576			private _ValueReplacer _003Crep_003E5__9;15771578			private StringBuilder _003C_003E7__wrap9;15791580			private ConfiguredTaskAwaiter<string> _003C_003Eu__2;15811582			private System.Collections.Generic.IEnumerator<DbObjectKey> _003C_003E7__wrap10;15831584			private ConfiguredTaskAwaiter _003C_003Eu__3;15851586			private void MoveNext()1587			{1588				//IL_00da: Unknown result type (might be due to invalid IL or missing references)1589				//IL_00df: Unknown result type (might be due to invalid IL or missing references)1590				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)1591				//IL_005e: Unknown result type (might be due to invalid IL or missing references)1592				//IL_0068: Expected O, but got Unknown1593				//IL_0091: Unknown result type (might be due to invalid IL or missing references)1594				//IL_009c: Unknown result type (might be due to invalid IL or missing references)1595				//IL_00a1: Unknown result type (might be due to invalid IL or missing references)1596				//IL_00a5: Unknown result type (might be due to invalid IL or missing references)1597				//IL_00aa: Unknown result type (might be due to invalid IL or missing references)1598				//IL_00bf: Unknown result type (might be due to invalid IL or missing references)1599				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)1600				//IL_03cd: Unknown result type (might be due to invalid IL or missing references)1601				//IL_03d2: Unknown result type (might be due to invalid IL or missing references)1602				//IL_03da: Unknown result type (might be due to invalid IL or missing references)1603				//IL_045c: Unknown result type (might be due to invalid IL or missing references)1604				//IL_0461: Unknown result type (might be due to invalid IL or missing references)1605				//IL_0469: Unknown result type (might be due to invalid IL or missing references)1606				//IL_05cf: Unknown result type (might be due to invalid IL or missing references)1607				//IL_05d4: Unknown result type (might be due to invalid IL or missing references)1608				//IL_05dc: Unknown result type (might be due to invalid IL or missing references)1609				//IL_0689: Unknown result type (might be due to invalid IL or missing references)1610				//IL_068e: Unknown result type (might be due to invalid IL or missing references)1611				//IL_0696: Unknown result type (might be due to invalid IL or missing references)1612				//IL_0724: Unknown result type (might be due to invalid IL or missing references)1613				//IL_0729: Unknown result type (might be due to invalid IL or missing references)1614				//IL_0731: Unknown result type (might be due to invalid IL or missing references)1615				//IL_0874: Unknown result type (might be due to invalid IL or missing references)1616				//IL_0879: Unknown result type (might be due to invalid IL or missing references)1617				//IL_0881: Unknown result type (might be due to invalid IL or missing references)1618				//IL_0413: Unknown result type (might be due to invalid IL or missing references)1619				//IL_041e: Unknown result type (might be due to invalid IL or missing references)1620				//IL_0423: Unknown result type (might be due to invalid IL or missing references)1621				//IL_0427: Unknown result type (might be due to invalid IL or missing references)1622				//IL_042c: Unknown result type (might be due to invalid IL or missing references)1623				//IL_0441: Unknown result type (might be due to invalid IL or missing references)1624				//IL_0443: Unknown result type (might be due to invalid IL or missing references)1625				//IL_06db: Unknown result type (might be due to invalid IL or missing references)1626				//IL_06e6: Unknown result type (might be due to invalid IL or missing references)1627				//IL_06eb: Unknown result type (might be due to invalid IL or missing references)1628				//IL_06ef: Unknown result type (might be due to invalid IL or missing references)1629				//IL_06f4: Unknown result type (might be due to invalid IL or missing references)1630				//IL_0640: Unknown result type (might be due to invalid IL or missing references)1631				//IL_064b: Unknown result type (might be due to invalid IL or missing references)1632				//IL_0650: Unknown result type (might be due to invalid IL or missing references)1633				//IL_0654: Unknown result type (might be due to invalid IL or missing references)1634				//IL_0659: Unknown result type (might be due to invalid IL or missing references)1635				//IL_082b: Unknown result type (might be due to invalid IL or missing references)1636				//IL_0836: Unknown result type (might be due to invalid IL or missing references)1637				//IL_083b: Unknown result type (might be due to invalid IL or missing references)1638				//IL_083f: Unknown result type (might be due to invalid IL or missing references)1639				//IL_0844: Unknown result type (might be due to invalid IL or missing references)1640				//IL_0709: Unknown result type (might be due to invalid IL or missing references)1641				//IL_070b: Unknown result type (might be due to invalid IL or missing references)1642				//IL_066e: Unknown result type (might be due to invalid IL or missing references)1643				//IL_0670: Unknown result type (might be due to invalid IL or missing references)1644				//IL_0859: Unknown result type (might be due to invalid IL or missing references)1645				//IL_085b: Unknown result type (might be due to invalid IL or missing references)1646				//IL_0384: Unknown result type (might be due to invalid IL or missing references)1647				//IL_038f: Unknown result type (might be due to invalid IL or missing references)1648				//IL_0394: Unknown result type (might be due to invalid IL or missing references)1649				//IL_0398: Unknown result type (might be due to invalid IL or missing references)1650				//IL_039d: Unknown result type (might be due to invalid IL or missing references)1651				//IL_0586: Unknown result type (might be due to invalid IL or missing references)1652				//IL_0591: Unknown result type (might be due to invalid IL or missing references)1653				//IL_0596: Unknown result type (might be due to invalid IL or missing references)1654				//IL_059a: Unknown result type (might be due to invalid IL or missing references)1655				//IL_059f: Unknown result type (might be due to invalid IL or missing references)1656				//IL_03b2: Unknown result type (might be due to invalid IL or missing references)1657				//IL_03b4: Unknown result type (might be due to invalid IL or missing references)1658				//IL_05b4: Unknown result type (might be due to invalid IL or missing references)1659				//IL_05b6: Unknown result type (might be due to invalid IL or missing references)1660				int num = _003C_003E1__state;1661				JobsAssemblyGenerator jobsAssemblyGenerator = _003C_003E4__this;1662				string result3;1663				try1664				{1665					ConfiguredTaskAwaiter<IMetaTable> val;1666					IMetaTable result2;1667					IOrderedEnumerable<_003C_003Ef__AnonymousType8<_DataObject, _DataObject, global::_003C_003Ef__AnonymousType9<DbObjectKey, string>>> val3;1668					_DataObject obj2;1669					switch (num)1670					{1671					default:1672						_003C_003E8__1 = new _003C_003Ec__DisplayClass22_0();1673						_003C_003E8__1._003C_003E4__this = _003C_003E4__this;1674						_003C_003E8__1.options = options;1675						_003Ccode_003E5__2 = new StringBuilder();1676						_003Cfooter_003E5__3 = null;1677						_003CeventName_003E5__4 = "";1678						_003CchainKeysByName_003E5__5 = new SortedList<string, DbObjectKey>();1679						val = jobsAssemblyGenerator._metaData.GetTableAsync("JobEventGen", ct).ConfigureAwait(false).GetAwaiter();1680						if (!val.IsCompleted)1681						{1682							num = (_003C_003E1__state = 0);1683							_003C_003Eu__1 = val;1684							_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IMetaTable>, _003C_GenerateEventsAsync_003Ed__22>(ref val, ref this);1685							return;1686						}1687						goto IL_00f6;1688					case 0:1689						val = _003C_003Eu__1;1690						_003C_003Eu__1 = default(ConfiguredTaskAwaiter<IMetaTable>);1691						num = (_003C_003E1__state = -1);1692						goto IL_00f6;1693					case 1:1694					case 2:1695					case 3:1696					case 4:1697					case 5:1698						try1699						{1700							ConfiguredTaskAwaiter<string> val2;1701							bool flag;1702							string result;1703							switch (num)1704							{1705							case 1:1706								val2 = _003C_003Eu__2;1707								_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1708								num = (_003C_003E1__state = -1);1709								goto IL_03e9;1710							case 2:1711								val2 = _003C_003Eu__2;1712								_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1713								num = (_003C_003E1__state = -1);1714								goto IL_0478;1715							case 3:1716								val2 = _003C_003Eu__2;1717								_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1718								num = (_003C_003E1__state = -1);1719								goto IL_05eb;1720							case 4:1721								val2 = _003C_003Eu__2;1722								_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1723								num = (_003C_003E1__state = -1);1724								goto IL_06a5;1725							case 5:1726								val2 = _003C_003Eu__2;1727								_003C_003Eu__2 = default(ConfiguredTaskAwaiter<string>);1728								num = (_003C_003E1__state = -1);1729								goto IL_0740;1730							default:1731								{1732									if (!((System.Collections.IEnumerator)_003C_003E7__wrap6).MoveNext())1733									{1734										break;1735									}1736									_003Cevt_003E5__8 = _003C_003E7__wrap6.Current;1737									_003Crep_003E5__9 = new _ValueReplacer(jobsAssemblyGenerator._metaData, _003CjobEventGenTable_003E5__6, _003Cevt_003E5__8.JobEventGen, jobsAssemblyGenerator._preloadData, CheckPropertyReferences);1738									string value = _003Cevt_003E5__8.QBMEvent.GetValue<string>("EventName");1739									if (!string.Equals(value, _003CeventName_003E5__4, (StringComparison)5))1740									{1741										if (_003Cfooter_003E5__3 != null)1742										{1743											_003Ccode_003E5__2.Append(_003Cfooter_003E5__3);1744										}1745										_003CeventName_003E5__4 = value;1746										_003C_003E7__wrap9 = _003Ccode_003E5__2;1747										val2 = _003Crep_003E5__9.ReplaceAsync("Event_Header", ct).ConfigureAwait(false).GetAwaiter();1748										if (!val2.IsCompleted)1749										{1750											num = (_003C_003E1__state = 1);1751											_003C_003Eu__2 = val2;1752											_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateEventsAsync_003Ed__22>(ref val2, ref this);1753											return;1754										}1755										goto IL_03e9;1756									}1757									goto IL_048a;1758								}1759								IL_03e9:1760								result = val2.GetResult();1761								_003C_003E7__wrap9.Append(result);1762								_003C_003E7__wrap9 = null;1763								val2 = _003Crep_003E5__9.ReplaceAsync("Event_Footer", ct).ConfigureAwait(false).GetAwaiter();1764								if (!val2.IsCompleted)1765								{1766									num = (_003C_003E1__state = 2);1767									_003C_003Eu__2 = val2;1768									_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateEventsAsync_003Ed__22>(ref val2, ref this);1769									return;1770								}1771								goto IL_0478;1772								IL_078a:1773								_003Crep_003E5__9 = null;1774								_003Cevt_003E5__8 = null;1775								goto default;1776								IL_0478:1777								result = val2.GetResult();1778								_003Cfooter_003E5__3 = result;1779								goto IL_048a;1780								IL_048a:1781								try1782								{1783									flag = jobsAssemblyGenerator._ParseExpression(_003Crep_003E5__9.GetValue<string>("FK(UID_JobChain).PreprocessorCondition"));1784								}1785								catch (System.Exception ex)1786								{1787									ScriptError obj = new ScriptError1788									{1789										Column = 01790									};1791									LanguageManager instance = LanguageManager.Instance;1792									object name = _003Cevt_003E5__8.Chain.Name;1793									obj.ErrorText = instance.FormatString("strError810147", new System.ReadOnlySpan<object>(ref name)) + " " + ex.Message;1794									obj.FileName = "Unknown File";1795									obj.Line = 1;1796									obj.ObjectKey = _003Cevt_003E5__8.Chain.Key;1797									obj.ScriptLine = 1;1798									obj.ScriptName = "PreprocessorCondition of job " + _003Cevt_003E5__8.Chain.Name;1799									ScriptError scriptError = obj;1800									throw new ScriptCompileException(new ScriptError[1] { scriptError }, _003Crep_003E5__9.GetValue<string>("FK(UID_JobChain).PreprocessorCondition"));1801								}1802								if (flag)1803								{1804									_003C_003E7__wrap9 = _003Ccode_003E5__2;1805									val2 = _003Crep_003E5__9.ReplaceAsync("Event_Chain", ct).ConfigureAwait(false).GetAwaiter();1806									if (!val2.IsCompleted)1807									{1808										num = (_003C_003E1__state = 3);1809										_003C_003Eu__2 = val2;1810										_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateEventsAsync_003Ed__22>(ref val2, ref this);1811										return;1812									}1813									goto IL_05eb;1814								}1815								goto IL_078a;1816								IL_06a5:1817								result = val2.GetResult();1818								_003C_003E7__wrap9.Append(result);1819								_003C_003E7__wrap9 = null;1820								goto IL_06c3;1821								IL_06c3:1822								_003C_003E7__wrap9 = _003Ccode_003E5__2;1823								val2 = _003Crep_003E5__9.ReplaceAsync("Event_EndChain", ct).ConfigureAwait(false).GetAwaiter();1824								if (!val2.IsCompleted)1825								{1826									num = (_003C_003E1__state = 5);1827									_003C_003Eu__2 = val2;1828									_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateEventsAsync_003Ed__22>(ref val2, ref this);1829									return;1830								}1831								goto IL_0740;1832								IL_05eb:1833								result = val2.GetResult();1834								_003C_003E7__wrap9.Append(result);1835								_003C_003E7__wrap9 = null;1836								if (!string.IsNullOrEmpty(_003Cevt_003E5__8.JobEventGen.GetValue<string>("ProcessDisplay")))1837								{1838									_003C_003E7__wrap9 = _003Ccode_003E5__2;1839									val2 = _003Crep_003E5__9.ReplaceAsync("Event_ProcessTracking", ct).ConfigureAwait(false).GetAwaiter();1840									if (!val2.IsCompleted)1841									{1842										num = (_003C_003E1__state = 4);1843										_003C_003Eu__2 = val2;1844										_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<string>, _003C_GenerateEventsAsync_003Ed__22>(ref val2, ref this);1845										return;1846									}1847									goto IL_06a5;1848								}1849								goto IL_06c3;1850								IL_0740:1851								result = val2.GetResult();1852								_003C_003E7__wrap9.Append(result);1853								_003C_003E7__wrap9 = null;1854								CollectionExtensions.TryAdd<string, DbObjectKey>((IDictionary<string, DbObjectKey>)(object)_003CchainKeysByName_003E5__5, _003Cevt_003E5__8.Chain.Name, _003Cevt_003E5__8.Chain.Key);1855								goto IL_078a;1856							}1857						}1858						finally1859						{1860							if (num < 0 && _003C_003E7__wrap6 != null)1861							{1862								((System.IDisposable)_003C_003E7__wrap6).Dispose();1863							}1864						}1865						_003C_003E7__wrap6 = null;1866						if (_003Cfooter_003E5__3 != null)1867						{1868							_003Ccode_003E5__2.Append(_003Cfooter_003E5__3);1869						}1870						_003C_003E7__wrap10 = ((System.Collections.Generic.IEnumerable<DbObjectKey>)_003CchainKeysByName_003E5__5.Values).GetEnumerator();1871						break;1872					case 6:1873						break;1874						IL_00f6:1875						result2 = val.GetResult();1876						_003CjobEventGenTable_003E5__6 = result2;1877						_003C_003E8__1.uidTable = table.GetValue<string>("UID_DialogTable");1878						_003C_003E8__1.tableName = table.GetValue<string>("Tablename");1879						_003C_003E8__1.qbmEvents = Enumerable.Select<KeyValuePair<DbObjectKey, _DataObject>, _DataObject>(Enumerable.Where<KeyValuePair<DbObjectKey, _DataObject>>((System.Collections.Generic.IEnumerable<KeyValuePair<DbObjectKey, _DataObject>>)jobsAssemblyGenerator._preloadData.TableData("QBMEvent"), (Func<KeyValuePair<DbObjectKey, _DataObject>, bool>)((KeyValuePair<DbObjectKey, _DataObject> e) => string.Equals(e.Value.GetValue<string>("UID_DialogTable"), _003C_003E8__1.uidTable, (StringComparison)4))), (Func<KeyValuePair<DbObjectKey, _DataObject>, _DataObject>)((KeyValuePair<DbObjectKey, _DataObject> e) => e.Value)).ToDictionarySafe<_DataObject, string>((_DataObject e) => e.GetValue<string>("UID_QBMEvent"), (IEqualityComparer<string>)(object)StringComparer.Ordinal);1880						val3 = Enumerable.ThenBy(Enumerable.OrderBy(Enumerable.Where(Enumerable.Select((System.Collections.Generic.IEnumerable<_DataObject>)Enumerable.ToArray<_DataObject>(Enumerable.Where<_DataObject>(Enumerable.Select<KeyValuePair<DbObjectKey, _DataObject>, _DataObject>(Enumerable.Where<KeyValuePair<DbObjectKey, _DataObject>>((System.Collections.Generic.IEnumerable<KeyValuePair<DbObjectKey, _DataObject>>)jobsAssemblyGenerator._preloadData.TableData("JobEventGen"), (Func<KeyValuePair<DbObjectKey, _DataObject>, bool>)((KeyValuePair<DbObjectKey, _DataObject> e) => _003C_003E8__1.qbmEvents.ContainsKey(e.Value.GetValue<string>("UID_QBMEvent")))), (Func<KeyValuePair<DbObjectKey, _DataObject>, _DataObject>)((KeyValuePair<DbObjectKey, _DataObject> e) => e.Value)), (Func<_DataObject, bool>)((_DataObject evt) => _003C_003E8__1._003C_003E4__this._preloadData.TryGetValue("JobChain", evt.GetValue<string>("UID_JobChain"), out obj2) && obj2 != null && !obj2.GetValue<bool>("NoGenerate")))), delegate(_DataObject e)1881						{1882							_DataObject qBMEvent = default(_DataObject);1883							_003C_003E8__1.qbmEvents.TryGetValue(e.GetValue<string>("UID_QBMEvent"), ref qBMEvent);1884							DbObjectKey key = new DbObjectKey("JobChain", e.GetValue<string>("UID_JobChain"));1885							string name2 = "";1886							if (_003C_003E8__1._003C_003E4__this._preloadData.TryGetValue(key, out obj2) && obj2 != null)1887							{1888								name2 = obj2.GetValue<string>("Name");1889							}1890							return new1891							{1892								JobEventGen = e,1893								QBMEvent = qBMEvent,1894								Chain = new1895								{1896									Key = key,1897									Name = name21898								}1899							};1900						}), e => e.QBMEvent != null), e => e.QBMEvent.GetValue<string>("EventName"), (IComparer<string>)(object)StringComparer.OrdinalIgnoreCase), e => e.JobEventGen.GetValue<int>("OrderNr"));1901						_003C_003E7__wrap6 = ((System.Collections.Generic.IEnumerable<_003C_003Ef__AnonymousType8<_DataObject, _DataObject, global::_003C_003Ef__AnonymousType9<DbObjectKey, string>>>)val3).GetEnumerator();1902						goto case 1;1903					}1904					try1905					{1906						if (num != 6)1907						{1908							goto IL_0897;1909						}1910						ConfiguredTaskAwaiter val4 = _003C_003Eu__3;1911						_003C_003Eu__3 = default(ConfiguredTaskAwaiter);1912						num = (_003C_003E1__state = -1);1913						goto IL_0890;1914						IL_0890:1915						((ConfiguredTaskAwaiter)(ref val4)).GetResult();1916						goto IL_0897;1917						IL_0897:1918						if (((System.Collections.IEnumerator)_003C_003E7__wrap10).MoveNext())1919						{1920							DbObjectKey current = _003C_003E7__wrap10.Current;1921							ConfiguredTaskAwaitable val5 = jobsAssemblyGenerator._GenerateChainAsync(_003Ccode_003E5__2, current, CheckPropertyReferences, ct).ConfigureAwait(false);1922							val4 = ((ConfiguredTaskAwaitable)(ref val5)).GetAwaiter();1923							if (!((ConfiguredTaskAwaiter)(ref val4)).IsCompleted)1924							{1925								num = (_003C_003E1__state = 6);1926								_003C_003Eu__3 = val4;1927								_003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003C_GenerateEventsAsync_003Ed__22>(ref val4, ref this);1928								return;1929							}1930							goto IL_0890;1931						}1932					}1933					finally1934					{1935						if (num < 0 && _003C_003E7__wrap10 != null)1936						{1937							((System.IDisposable)_003C_003E7__wrap10).Dispose();1938						}1939					}1940					_003C_003E7__wrap10 = null;1941					result3 = ((object)_003Ccode_003E5__2).ToString();1942				}1943				catch (System.Exception exception)1944				{1945					_003C_003E1__state = -2;1946					_003C_003E8__1 = null;1947					_003Ccode_003E5__2 = null;1948					_003Cfooter_003E5__3 = null;1949					_003CeventName_003E5__4 = null;1950					_003CchainKeysByName_003E5__5 = null;1951					_003CjobEventGenTable_003E5__6 = null;1952					_003C_003Et__builder.SetException(exception);1953					return;1954				}1955				_003C_003E1__state = -2;1956				_003C_003E8__1 = null;1957				_003Ccode_003E5__2 = null;1958				_003Cfooter_003E5__3 = null;1959				_003CeventName_003E5__4 = null;1960				_003CchainKeysByName_003E5__5 = null;1961				_003CjobEventGenTable_003E5__6 = null;1962				_003C_003Et__builder.SetResult(result3);1963				System.Threading.Tasks.Task CheckPropertyReferences(string codeToCheck, Func<string> getDisplay, CancellationToken cti)1964				{1965					//IL_0041: Unknown result type (might be due to invalid IL or missing references)1966					_003C_003Ec__DisplayClass22_1 CS_0024_003C_003E8__locals1 = new _003C_003Ec__DisplayClass22_11967					{1968						getDisplay = getDisplay1969					};1970					return Tools.CheckPropertyReferencesAsync(((_003C_003Ec__DisplayClass22_0)(object)this)._003C_003E4__this._config, ((_003C_003Ec__DisplayClass22_0)(object)this)._003C_003E4__this._metaData, ((_003C_003Ec__DisplayClass22_0)(object)this).options.ScriptLanguage, ((_003C_003Ec__DisplayClass22_0)(object)this).tableName, codeToCheck, (System.Exception innerException) => (System.Exception)(object)new ViException(57335005, ExceptionRelevance.EndUser, innerException, CS_0024_003C_003E8__locals1.getDisplay.Invoke()), cti);1971				}1972			}19731974			[DebuggerHidden]1975			private void SetStateMachine(IAsyncStateMachine stateMachine)1976			{1977				_003C_003Et__builder.SetStateMachine(stateMachine);1978			}1979		}19801981		[StructLayout((LayoutKind)3)]1982		[CompilerGenerated]1983		private struct _003C_GenerateJobAsync_003Ed__24 : IAsyncStateMachine1984		{1985			public int _003C_003E1__state;19861987			public AsyncTaskMethodBuilder _003C_003Et__builder;19881989			public JobsAssemblyGenerator _003C_003E4__this;19901991			public DbObjectKey jobKey;19921993			public CancellationToken ct;19941995			public Func<string, Func<string>, CancellationToken, System.Threading.Tasks.Task> checkPropertyReferences;19961997			public StringBuilder code;19981999			private _DataObject _003Cjob_003E5__2;20002001			private _ValueReplacer _003Crep_003E5__3;20022003			private bool _003ChasCondition_003E5__4;20042005			private bool _003ChasPreproc_003E5__5;20062007			private string _003CuidSuccessor_003E5__6;20082009			private string _003CuidError_003E5__7;20102011			private string _003CuidJob_003E5__8;20122013			private IMetaTable _003CparamTable_003E5__9;20142015			private ConfiguredTaskAwaiter<IMetaTable> _003C_003Eu__1;20162017			private StringBuilder _003C_003E7__wrap9;20182019			private ConfiguredTaskAwaiter<string> _003C_003Eu__2;20202021			private System.Collections.Generic.IEnumerator<KeyValuePair<DbObjectKey, _DataObject>> _003C_003E7__wrap10;20222023			private _ValueReplacer _003CrepParam_003E5__12;20242025			private bool _003Coptional_003E5__13;20262027			private bool _003Ccrypted_003E5__14;20282029			private bool _003CpartialCrypted_003E5__15;20302031			private bool _003Chidden_003E5__16;20322033			private ConfiguredTaskAwaiter _003C_003Eu__3;20342035			private void MoveNext()2036			{2037				//IL_016d: Unknown result type (might be due to invalid IL or missing references)2038				//IL_0172: Unknown result type (might be due to invalid IL or missing references)2039				//IL_0179: Unknown result type (might be due to invalid IL or missing references)2040				//IL_0287: Unknown result type (might be due to invalid IL or missing references)2041				//IL_028c: Unknown result type (might be due to invalid IL or missing references)2042				//IL_0294: Unknown result type (might be due to invalid IL or missing references)2043				//IL_032d: Unknown result ty
…