VI.UI.Base/VI.UI.Base.Remoting/RemoteActivatorClient.cs
Decompiler Source FileVI.UI.Base.RemoteActivatorClientDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- CallMethod: PerformActivate at line 139
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 RemoteActivatorClient; methods MoveNext, SetStateMachine, PerformActivate, Ping, WaitForServerAsync; references ESet; markers references DB/Dialog objects
Classes
RemoteActivatorClientDB/Dialog object references
OIM key/entity markers
None extracted.API/entity calls
None extracted.Registrations / 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 NLog;8using VI.Remoting.Security;9using VI.Remoting.Services;1011namespace VI.UI.Base.Remoting;1213public class RemoteActivatorClient : RemoteServiceClient, IRemoteActivatorService14{15 [StructLayout((LayoutKind)3)]16 [CompilerGenerated]17 private struct _003CWaitForServerAsync_003Ed__3 : IAsyncStateMachine18 {19 public int _003C_003E1__state;2021 public AsyncTaskMethodBuilder _003C_003Et__builder;2223 public TimeSpan timeout;2425 public RemoteActivatorClient _003C_003E4__this;2627 public CancellationToken ct;2829 private bool _003Cping_003E5__2;3031 private System.DateTime _003CdtEnd_003E5__3;3233 private ConfiguredTaskAwaiter _003C_003Eu__1;3435 private void MoveNext()36 {37 //IL_00aa: Unknown result type (might be due to invalid IL or missing references)38 //IL_00af: Unknown result type (might be due to invalid IL or missing references)39 //IL_00b6: Unknown result type (might be due to invalid IL or missing references)40 //IL_001b: Unknown result type (might be due to invalid IL or missing references)41 //IL_0064: Unknown result type (might be due to invalid IL or missing references)42 //IL_006f: Unknown result type (might be due to invalid IL or missing references)43 //IL_0074: Unknown result type (might be due to invalid IL or missing references)44 //IL_0077: Unknown result type (might be due to invalid IL or missing references)45 //IL_007c: Unknown result type (might be due to invalid IL or missing references)46 //IL_00e9: Unknown result type (might be due to invalid IL or missing references)47 //IL_0090: Unknown result type (might be due to invalid IL or missing references)48 //IL_0091: Unknown result type (might be due to invalid IL or missing references)49 int num = _003C_003E1__state;50 RemoteActivatorClient remoteActivatorClient = _003C_003E4__this;51 try52 {53 if (num != 0)54 {55 _003CdtEnd_003E5__3 = System.DateTime.Now + timeout;56 goto IL_002b;57 }58 ConfiguredTaskAwaiter val = _003C_003Eu__1;59 _003C_003Eu__1 = default(ConfiguredTaskAwaiter);60 num = (_003C_003E1__state = -1);61 goto IL_00c5;62 IL_00c5:63 ((ConfiguredTaskAwaiter)(ref val)).GetResult();64 ((CancellationToken)(ref ct)).ThrowIfCancellationRequested();65 goto IL_00d7;66 IL_00d7:67 if (System.DateTime.Now > _003CdtEnd_003E5__3)68 {69 throw new TimeoutException();70 }71 if (!_003Cping_003E5__2)72 {73 goto IL_002b;74 }75 remoteActivatorClient.m_Log.Debug("Service available.");76 goto end_IL_000e;77 IL_002b:78 try79 {80 _003Cping_003E5__2 = remoteActivatorClient.Ping();81 }82 catch (System.Exception)83 {84 _003Cping_003E5__2 = false;85 }86 if (!_003Cping_003E5__2)87 {88 remoteActivatorClient.m_Log.Debug("Wait for service.");89 ConfiguredTaskAwaitable val2 = System.Threading.Tasks.Task.Delay(500, ct).ConfigureAwait(false);90 val = ((ConfiguredTaskAwaitable)(ref val2)).GetAwaiter();91 if (!((ConfiguredTaskAwaiter)(ref val)).IsCompleted)92 {93 num = (_003C_003E1__state = 0);94 _003C_003Eu__1 = val;95 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).AwaitUnsafeOnCompleted<ConfiguredTaskAwaiter, _003CWaitForServerAsync_003Ed__3>(ref val, ref this);96 return;97 }98 goto IL_00c5;99 }100 goto IL_00d7;101 end_IL_000e:;102 }103 catch (System.Exception exception)104 {105 _003C_003E1__state = -2;106 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetException(exception);107 return;108 }109 _003C_003E1__state = -2;110 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetResult();111 }112113 [DebuggerHidden]114 private void SetStateMachine(IAsyncStateMachine stateMachine)115 {116 ((AsyncTaskMethodBuilder)(ref _003C_003Et__builder)).SetStateMachine(stateMachine);117 }118 }119120 private readonly LogSession m_Log = new LogSession("RemoteActivatorClient", ((object)Guid.NewGuid()/*cast due to .constrained prefix*/).ToString());121122 [field: CompilerGenerated]123 public Process Process124 {125 [CompilerGenerated]126 get;127 }128129 public RemoteActivatorClient(Process serverProcess)130 : base(new RemoteServiceDescriptor("RemoteActivator", serverProcess.Id.ToString(), null, new NamedPipeRemoteAccessParameter(NamedPipeAuthenticationMethod.Instance)), null, null)131 {132 //IL_0006: Unknown result type (might be due to invalid IL or missing references)133 //IL_000b: Unknown result type (might be due to invalid IL or missing references)134 Process = serverProcess;135 }136137 public void PerformActivate(RemoteActivationEventArgs args)138 {139 CallMethod("PerformActivate", ParameterInfo.Create("args", args));140 ResetChannel();141 }142143 public bool Ping()144 {145 return CallFunction<bool>("Ping", System.Array.Empty<ParameterInfo>());146 }147148 [AsyncStateMachine(typeof(_003CWaitForServerAsync_003Ed__3))]149 public System.Threading.Tasks.Task WaitForServerAsync(TimeSpan timeout, CancellationToken ct = default(CancellationToken))150 {151 //IL_0002: Unknown result type (might be due to invalid IL or missing references)152 //IL_0007: Unknown result type (might be due to invalid IL or missing references)153 //IL_0016: Unknown result type (might be due to invalid IL or missing references)154 //IL_0017: Unknown result type (might be due to invalid IL or missing references)155 //IL_001e: Unknown result type (might be due to invalid IL or missing references)156 //IL_001f: Unknown result type (might be due to invalid IL or missing references)157 _003CWaitForServerAsync_003Ed__3 _003CWaitForServerAsync_003Ed__ = default(_003CWaitForServerAsync_003Ed__3);158 _003CWaitForServerAsync_003Ed__._003C_003Et__builder = AsyncTaskMethodBuilder.Create();159 _003CWaitForServerAsync_003Ed__._003C_003E4__this = this;160 _003CWaitForServerAsync_003Ed__.timeout = timeout;161 _003CWaitForServerAsync_003Ed__.ct = ct;162 _003CWaitForServerAsync_003Ed__._003C_003E1__state = -1;163 ((AsyncTaskMethodBuilder)(ref _003CWaitForServerAsync_003Ed__._003C_003Et__builder)).Start<_003CWaitForServerAsync_003Ed__3>(ref _003CWaitForServerAsync_003Ed__);164 return ((AsyncTaskMethodBuilder)(ref _003CWaitForServerAsync_003Ed__._003C_003Et__builder)).Task;165 }166}167