VI.FormBase/VI.FormBase.ComponentModel/EventCatcher.cs
Decompiler Source FileVI.FormBase.EventCatcherDecompiled Source
Interpretation
- Decompiled source file. Use method/event registrations and call-site extraction to connect back to DialogMethod, QBMEvent, and API layers.
Relations
- Event handler: Raised at line 66
- Event handler: Raised at line 73
- Event handler: Raised at line 76
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 EventCatcher; methods Dispose, Event_Raised
Classes
EventCatcherMethods
DB/Dialog object references
None extracted.
OIM key/entity markers
None extracted.API/entity calls
None extracted.Registrations / handlers
None extracted.
Complete Source
1using System;2using System.Reflection;3using System.Runtime.CompilerServices;4using System.Threading;56namespace VI.FormBase.ComponentModel;78public class EventCatcher : IEventCatcher, System.IDisposable9{10 [CompilerGenerated]11 private EventHandler m_EventRaised;1213 private readonly string m_EventName;1415 private readonly object m_SourceObject;1617 public object SourceObject => m_SourceObject;1819 public string EventName => m_EventName;2021 public event EventHandler EventRaised22 {23 [CompilerGenerated]24 add25 {26 //IL_0010: Unknown result type (might be due to invalid IL or missing references)27 //IL_0016: Expected O, but got Unknown28 EventHandler val = this.m_EventRaised;29 EventHandler val2;30 do31 {32 val2 = val;33 EventHandler val3 = (EventHandler)System.Delegate.Combine((System.Delegate)(object)val2, (System.Delegate)(object)value);34 val = Interlocked.CompareExchange<EventHandler>(ref this.m_EventRaised, val3, val2);35 }36 while (val != val2);37 }38 [CompilerGenerated]39 remove40 {41 //IL_0010: Unknown result type (might be due to invalid IL or missing references)42 //IL_0016: Expected O, but got Unknown43 EventHandler val = this.m_EventRaised;44 EventHandler val2;45 do46 {47 val2 = val;48 EventHandler val3 = (EventHandler)System.Delegate.Remove((System.Delegate)(object)val2, (System.Delegate)(object)value);49 val = Interlocked.CompareExchange<EventHandler>(ref this.m_EventRaised, val3, val2);50 }51 while (val != val2);52 }53 }5455 public EventCatcher(object sourceObject, string eventName)56 {57 //IL_0053: Unknown result type (might be due to invalid IL or missing references)58 //IL_0059: Expected O, but got Unknown59 //IL_000e: Unknown result type (might be due to invalid IL or missing references)60 if (sourceObject == null)61 {62 throw new ArgumentNullException("sourceObject");63 }64 m_SourceObject = sourceObject;65 m_EventName = eventName;66 ((MethodBase)m_SourceObject.GetType().GetEvent(m_EventName).GetAddMethod(true)).Invoke(m_SourceObject, new object[1] { (object)new EventHandler(Event_Raised) });67 }6869 public void Dispose()70 {71 //IL_0031: Unknown result type (might be due to invalid IL or missing references)72 //IL_0037: Expected O, but got Unknown73 ((MethodBase)m_SourceObject.GetType().GetEvent(m_EventName).GetRemoveMethod(true)).Invoke(m_SourceObject, new object[1] { (object)new EventHandler(Event_Raised) });74 }7576 private void Event_Raised(object sender, EventArgs args)77 {78 if (this.EventRaised != null)79 {80 this.EventRaised.Invoke((object)this, args);81 }82 }83}84