Common.Customizer/QBM.Customizer/AlternateCaptionsEntityLogic.cs
Decompiler Source FileCommon.Customizer.AlternateCaptionsEntityLogicDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- Function registration: GetAlternateCaptions at line 157
- Function registration: GetAlternateTableCaption at line 158
Typed Edges
- No typed edges extracted for this source.
References
- No direct source references extracted.
Referenced By
- No direct source references extracted.
C# source-derived context
Generated by pattern extraction from the decompiled C# source and decompile index. This is factual source evidence, not inferred behavior.
None extracted.
Summary: classes AlternateCaptionsEntityLogic; methods MoveNext, SetStateMachine, _GetAlternateTableCaption, OnSavedAsync
Classes
AlternateCaptionsEntityLogicDB/Dialog object references
None extracted.
OIM key/entity markers
None extracted.API/entity calls
ContainsRegistrations / handlers
None extracted.
Complete Source
1using System;2using System.Collections.Generic;3using System.Diagnostics;4using System.Runtime.CompilerServices;5using System.Runtime.InteropServices;6using System.Threading;7using System.Threading.Tasks;8using VI.DB;9using VI.DB.Entities;1011namespace QBM.Customizer;1213public class AlternateCaptionsEntityLogic : StateLessEntityLogic14{15 [StructLayout((LayoutKind)3)]16 [CompilerGenerated]17 private struct _003C_GetAlternateCaptions_003Ed__1 : IAsyncStateMachine18 {19 public int _003C_003E1__state;2021 public AsyncTaskMethodBuilder<IReadOnlyDictionary<string, string>> _003C_003Et__builder;2223 public ISession s;2425 public IEntity e;2627 public CancellationToken ct;2829 private ConfiguredTaskAwaiter<IAlternateCaption?> _003C_003Eu__1;3031 private void MoveNext()32 {33 //IL_0060: Unknown result type (might be due to invalid IL or missing references)34 //IL_0065: Unknown result type (might be due to invalid IL or missing references)35 //IL_006c: Unknown result type (might be due to invalid IL or missing references)36 //IL_001d: Unknown result type (might be due to invalid IL or missing references)37 //IL_0028: Unknown result type (might be due to invalid IL or missing references)38 //IL_002d: Unknown result type (might be due to invalid IL or missing references)39 //IL_0030: Unknown result type (might be due to invalid IL or missing references)40 //IL_0035: Unknown result type (might be due to invalid IL or missing references)41 //IL_0049: Unknown result type (might be due to invalid IL or missing references)42 //IL_004a: Unknown result type (might be due to invalid IL or missing references)43 int num = _003C_003E1__state;44 IReadOnlyDictionary<string, string> result;45 try46 {47 ConfiguredTaskAwaiter<IAlternateCaption> val;48 if (num != 0)49 {50 val = AlternateCaptionsService.GetOrAdd(s).GetAlternateCaptionAsync(e, returnDefaults: false, ct).ConfigureAwait(false)51 .GetAwaiter();52 if (!val.IsCompleted)53 {54 num = (_003C_003E1__state = 0);55 _003C_003Eu__1 = val;56 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IAlternateCaption>, _003C_GetAlternateCaptions_003Ed__1>(ref val, ref this);57 return;58 }59 }60 else61 {62 val = _003C_003Eu__1;63 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IAlternateCaption>);64 num = (_003C_003E1__state = -1);65 }66 result = val.GetResult()?.Columns;67 }68 catch (System.Exception exception)69 {70 _003C_003E1__state = -2;71 _003C_003Et__builder.SetException(exception);72 return;73 }74 _003C_003E1__state = -2;75 _003C_003Et__builder.SetResult(result);76 }7778 [DebuggerHidden]79 private void SetStateMachine(IAsyncStateMachine stateMachine)80 {81 _003C_003Et__builder.SetStateMachine(stateMachine);82 }83 }8485 [StructLayout((LayoutKind)3)]86 [CompilerGenerated]87 private struct _003C_GetAlternateTableCaption_003Ed__2 : IAsyncStateMachine88 {89 public int _003C_003E1__state;9091 public AsyncTaskMethodBuilder<string> _003C_003Et__builder;9293 public ISession s;9495 public IEntity e;9697 public CancellationToken ct;9899 private ConfiguredTaskAwaiter<IAlternateCaption?> _003C_003Eu__1;100101 private void MoveNext()102 {103 //IL_0060: Unknown result type (might be due to invalid IL or missing references)104 //IL_0065: Unknown result type (might be due to invalid IL or missing references)105 //IL_006c: Unknown result type (might be due to invalid IL or missing references)106 //IL_001d: Unknown result type (might be due to invalid IL or missing references)107 //IL_0028: Unknown result type (might be due to invalid IL or missing references)108 //IL_002d: Unknown result type (might be due to invalid IL or missing references)109 //IL_0030: Unknown result type (might be due to invalid IL or missing references)110 //IL_0035: Unknown result type (might be due to invalid IL or missing references)111 //IL_0049: Unknown result type (might be due to invalid IL or missing references)112 //IL_004a: Unknown result type (might be due to invalid IL or missing references)113 int num = _003C_003E1__state;114 string result;115 try116 {117 ConfiguredTaskAwaiter<IAlternateCaption> val;118 if (num != 0)119 {120 val = AlternateCaptionsService.GetOrAdd(s).GetAlternateCaptionAsync(e, returnDefaults: false, ct).ConfigureAwait(false)121 .GetAwaiter();122 if (!val.IsCompleted)123 {124 num = (_003C_003E1__state = 0);125 _003C_003Eu__1 = val;126 _003C_003Et__builder.AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter<IAlternateCaption>, _003C_GetAlternateTableCaption_003Ed__2>(ref val, ref this);127 return;128 }129 }130 else131 {132 val = _003C_003Eu__1;133 _003C_003Eu__1 = default(ConfiguredTaskAwaiter<IAlternateCaption>);134 num = (_003C_003E1__state = -1);135 }136 result = val.GetResult()?.Table;137 }138 catch (System.Exception exception)139 {140 _003C_003E1__state = -2;141 _003C_003Et__builder.SetException(exception);142 return;143 }144 _003C_003E1__state = -2;145 _003C_003Et__builder.SetResult(result);146 }147148 [DebuggerHidden]149 private void SetStateMachine(IAsyncStateMachine stateMachine)150 {151 _003C_003Et__builder.SetStateMachine(stateMachine);152 }153 }154155 public AlternateCaptionsEntityLogic(EntityLogicConstructionParameters ep)156 {157 RegisterFunction("GetAlternateCaptions").As<IReadOnlyDictionary<string, string>>(_GetAlternateCaptions).Behavior(MethodBehavior.ValidForReadOnlyUser);158 RegisterFunction("GetAlternateTableCaption").As<string>(_GetAlternateTableCaption).Behavior(MethodBehavior.ValidForReadOnlyUser);159 }160161 [AsyncStateMachine(typeof(_003C_GetAlternateCaptions_003Ed__1))]162 private async System.Threading.Tasks.Task<IReadOnlyDictionary<string, string>?> _GetAlternateCaptions(ISession s, IEntity e, CancellationToken ct)163 {164 //IL_0002: Unknown result type (might be due to invalid IL or missing references)165 //IL_0007: Unknown result type (might be due to invalid IL or missing references)166 //IL_001e: Unknown result type (might be due to invalid IL or missing references)167 //IL_001f: Unknown result type (might be due to invalid IL or missing references)168 return (await AlternateCaptionsService.GetOrAdd(s).GetAlternateCaptionAsync(e, returnDefaults: false, ct).ConfigureAwait(false))?.Columns;169 }170171 [AsyncStateMachine(typeof(_003C_GetAlternateTableCaption_003Ed__2))]172 private async System.Threading.Tasks.Task<string?> _GetAlternateTableCaption(ISession s, IEntity e, CancellationToken ct)173 {174 //IL_0002: Unknown result type (might be due to invalid IL or missing references)175 //IL_0007: Unknown result type (might be due to invalid IL or missing references)176 //IL_001e: Unknown result type (might be due to invalid IL or missing references)177 //IL_001f: Unknown result type (might be due to invalid IL or missing references)178 return (await AlternateCaptionsService.GetOrAdd(s).GetAlternateCaptionAsync(e, returnDefaults: false, ct).ConfigureAwait(false))?.Table;179 }180181 public override System.Threading.Tasks.Task OnSavedAsync(IEntity entity, LogicReadWriteParameters parameters, CancellationToken ct)182 {183 //IL_0041: Unknown result type (might be due to invalid IL or missing references)184 if (entity.Contains("AlternatePropertyCaptions") && entity.Columns["AlternatePropertyCaptions"].IsDifferent && parameters.Session.Services.TryResolve<AlternateCaptionsService>(out var ret))185 {186 ret.Clear();187 }188 return base.OnSavedAsync(entity, parameters, ct);189 }190}191