ADS.Customizer/ADS.Customizer/ADSGroupLimit.cs
Decompiler Source FileADS.Customizer.ADSGroupLimitDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- CustomGenerated event: OverLimit at line 164
Typed Edges
- No typed edges extracted for this source.
References
- No direct source references extracted.
Referenced By
- No direct source references extracted.
C# source-derived context
Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.
references DB/Dialog objects
Summary: classes ADSGroupLimit; methods MoveNext, SetStateMachine, OnSavingAsync; references ADSDomain, ADSGroup; markers references DB/Dialog objects
Classes
ADSGroupLimitOIM key/entity markers
UID_ADSGroup UID_ADSDomainAPI/entity calls
IsFullSyncRegistrations / handlers
None extracted.
Complete Source
1using System;2using System.Diagnostics;3using System.Runtime.CompilerServices;4using System.Runtime.InteropServices;5using System.Threading;6using System.Threading.Tasks;7using TSB.Customizer;8using VI.DB.Entities;910namespace ADS.Customizer;1112public class ADSGroupLimit : StateLessEntityLogic13{14 [StructLayout((LayoutKind)3)]15 [CompilerGenerated]16 private struct _003COnSavingAsync_003Ed__1 : IAsyncStateMachine17 {18 public int _003C_003E1__state;1920 public AsyncTaskMethodBuilder<Diff> _003C_003Et__builder;2122 public IEntity entity;2324 public LogicReadWriteParameters parameters;2526 public CancellationToken ct;2728 public ADSGroupLimit _003C_003E4__this;2930 private ConfiguredTaskAwaiter<NameSpaceManagedBy> _003C_003Eu__1;3132 private ConfiguredTaskAwaiter _003C_003Eu__2;3334 private ConfiguredTaskAwaiter<Diff> _003C_003Eu__3;3536 private void MoveNext()37 {38 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)39 //IL_00af: Unknown result type (might be due to invalid IL or missing references)40 //IL_00b7: Unknown result type (might be due to invalid IL or missing references)41 //IL_013d: Unknown result type (might be due to invalid IL or missing references)42 //IL_0142: Unknown result type (might be due to invalid IL or missing references)43 //IL_014a: Unknown result type (might be due to invalid IL or missing references)44 //IL_01b4: Unknown result type (might be due to invalid IL or missing references)45 //IL_01b9: Unknown result type (might be due to invalid IL or missing references)46 //IL_01c1: Unknown result type (might be due to invalid IL or missing references)47 //IL_016e: Unknown result type (might be due to invalid IL or missing references)48 //IL_0179: Unknown result type (might be due to invalid IL or missing references)49 //IL_017e: Unknown result type (might be due to invalid IL or missing references)50 //IL_0182: Unknown result type (might be due to invalid IL or missing references)51 //IL_0187: Unknown result type (might be due to invalid IL or missing references)52 //IL_00f4: Unknown result type (might be due to invalid IL or missing references)53 //IL_00ff: Unknown result type (might be due to invalid IL or missing references)54 //IL_0104: Unknown result type (might be due to invalid IL or missing references)55 //IL_0108: Unknown result type (might be due to invalid IL or missing references)56 //IL_010d: Unknown result type (might be due to invalid IL or missing references)57 //IL_019c: Unknown result type (might be due to invalid IL or missing references)58 //IL_019e: Unknown result type (might be due to invalid IL or missing references)59 //IL_0061: Unknown result type (might be due to invalid IL or missing references)60 //IL_006c: Unknown result type (might be due to invalid IL or missing references)61 //IL_0071: Unknown result type (might be due to invalid IL or missing references)62 //IL_0075: Unknown result type (might be due to invalid IL or missing references)63 //IL_007a: Unknown result type (might be due to invalid IL or missing references)64 //IL_0122: Unknown result type (might be due to invalid IL or missing references)65 //IL_0124: Unknown result type (might be due to invalid IL or missing references)66 //IL_008f: Unknown result type (might be due to invalid IL or missing references)67 //IL_0091: Unknown result type (might be due to invalid IL or missing references)68 int num = _003C_003E1__state;69 ADSGroupLimit aDSGroupLimit = _003C_003E4__this;70 Diff result;71 try72 {73 bool flag;74 ConfiguredTaskAwaiter<NameSpaceManagedBy> val3;75 ConfiguredTaskAwaiter val2;76 ConfiguredTaskAwaiter<Diff> val;77 switch (num)78 {79 default:80 flag = !entity.IsLoaded && !parameters.Session.IsFullSync();81 if (flag)82 {83 val3 = TSBHelper.NamespaceManagedBy(parameters.CreateWalker(entity), "FK(UID_ADSGroup).FK(UID_ADSDomain).NamespaceManagedBy", ct).ConfigureAwait(false).GetAwaiter();84 if (!val3.IsCompleted)85 {86 num = (_003C_003E1__state = 0);87 _003C_003Eu__1 = val3;88 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<NameSpaceManagedBy>, _003COnSavingAsync_003Ed__1>(ref val3, ref this);89 return;90 }91 goto IL_00c6;92 }93 goto IL_00d1;94 case 0:95 val3 = _003C_003Eu__1;96 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<NameSpaceManagedBy>);97 num = (_003C_003E1__state = -1);98 goto IL_00c6;99 case 1:100 val2 = _003C_003Eu__2;101 _003C_003Eu__2 = default(ConfiguredTaskAwaiter);102 num = (_003C_003E1__state = -1);103 goto IL_0159;104 case 2:105 {106 val = _003C_003Eu__3;107 _003C_003Eu__3 = default(ConfiguredTaskAwaiter<Diff>);108 num = (_003C_003E1__state = -1);109 break;110 }111 IL_00c6:112 flag = val3.GetResult() == NameSpaceManagedBy.VISYNC;113 goto IL_00d1;114 IL_00d1:115 if (flag)116 {117 ConfiguredTaskAwaitable val4 = ADSHelper.CheckGroupLimit(parameters.Session, entity, parameters.UnitOfWork, ct).ConfigureAwait(false);118 val2 = ((ConfiguredTaskAwaitable)(ref val4)).GetAwaiter();119 if (!((ConfiguredTaskAwaiter)(ref val2)).IsCompleted)120 {121 num = (_003C_003E1__state = 1);122 _003C_003Eu__2 = val2;123 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003COnSavingAsync_003Ed__1>(ref val2, ref this);124 return;125 }126 goto IL_0159;127 }128 goto IL_0160;129 IL_0160:130 val = ((EntityLogicBase)aDSGroupLimit).OnSavingAsync(entity, parameters, ct).ConfigureAwait(false).GetAwaiter();131 if (!val.IsCompleted)132 {133 num = (_003C_003E1__state = 2);134 _003C_003Eu__3 = val;135 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<Diff>, _003COnSavingAsync_003Ed__1>(ref val, ref this);136 return;137 }138 break;139 IL_0159:140 ((ConfiguredTaskAwaiter)(ref val2)).GetResult();141 goto IL_0160;142 }143 result = val.GetResult();144 }145 catch (System.Exception exception)146 {147 _003C_003E1__state = -2;148 _003C_003Et__builder.SetException(exception);149 return;150 }151 _003C_003E1__state = -2;152 _003C_003Et__builder.SetResult(result);153 }154155 [DebuggerHidden]156 private void SetStateMachine(IAsyncStateMachine stateMachine)157 {158 _003C_003Et__builder.SetStateMachine(stateMachine);159 }160 }161162 public ADSGroupLimit()163 {164 Event("OverLimit").CustomGenerated();165 }166167 [AsyncStateMachine(typeof(_003COnSavingAsync_003Ed__1))]168 public override async System.Threading.Tasks.Task<Diff> OnSavingAsync(IEntity entity, LogicReadWriteParameters parameters, CancellationToken ct)169 {170 //IL_0002: Unknown result type (might be due to invalid IL or missing references)171 //IL_0007: Unknown result type (might be due to invalid IL or missing references)172 //IL_0026: Unknown result type (might be due to invalid IL or missing references)173 //IL_0027: Unknown result type (might be due to invalid IL or missing references)174 bool flag = !entity.IsLoaded && !parameters.Session.IsFullSync();175 if (flag)176 {177 flag = await TSBHelper.NamespaceManagedBy(parameters.CreateWalker(entity), "FK(UID_ADSGroup).FK(UID_ADSDomain).NamespaceManagedBy", ct).ConfigureAwait(false) == NameSpaceManagedBy.VISYNC;178 }179 if (flag)180 {181 await ADSHelper.CheckGroupLimit(parameters.Session, entity, parameters.UnitOfWork, ct).ConfigureAwait(false);182 }183 return await base.OnSavingAsync(entity, parameters, ct).ConfigureAwait(false);184 }185}186