public MyEventInfo(EventDefinition eventDefinition, MyClassInfo declaringType) : base() { this.name = eventDefinition.Name; string[] readableForms = Tools.GetHumanReadableForms(eventDefinition.EventType); this.typeFullName = readableForms[0]; this.typeFullNameWithoutRevArrayStrings = readableForms[1]; this.declaringType = declaringType; MethodDefinition adderInfo = eventDefinition.AddMethod; Debug.Assert(adderInfo != null, "Impossible! add_Event() must have been generated."); this.attributes = GetMyEventAttributes(eventDefinition); this.underlyingMethodsAttributes = GetMyInvokableMemberAttributes(adderInfo); this.CheckSupport(eventDefinition, adderInfo.Attributes); }
void Add(MyEventAttributes args) { bool lockTaken = false; m_addGuard.Enter(ref lockTaken); if (!m_queue.IsAddingCompleted) { m_queue.Add(args, CancellationToken.None); } else { MyLog.Default.WriteLine("Error sending analytics: " + args.EventType.ToString()); } if (lockTaken) { m_addGuard.Exit(); } }
public MyEventInfo(EventDefinition eventDefinition, MyClassInfo declaringType) : base() { this.name = eventDefinition.Name; string[] readableForms = Tools.GetHumanReadableForms(eventDefinition.EventType); this.typeFullName = readableForms[0]; this.typeFullNameWithoutRevArrayStrings = readableForms[1]; this.declaringType = declaringType; MethodDefinition adderInfo = eventDefinition.AddMethod; Debug.Assert(adderInfo != null, "Impossible! add_Event() must have been generated."); this.attributes = GetMyEventAttributes(eventDefinition); this.underlyingMethodsAttributes = GetMyInvokableMemberAttributes(adderInfo); this.CheckSupport(eventDefinition, adderInfo.Attributes); }
void Add(MyEventAttributes args) { bool lockTaken = false; m_addGuard.Enter(ref lockTaken); if (!m_queue.IsAddingCompleted) { m_queue.Add(args, CancellationToken.None); } else { MyLog.Default.WriteLine("Error sending analytics: " + args.EventType.ToString()); } if (lockTaken) m_addGuard.Exit(); }
private static MyEventAttributes GetMyEventAttributes(EventDefinition eventDefinition) { MyEventAttributes myEventAttributes = MyEventAttributes.None; return(myEventAttributes); }
private static string MyEventAndMyInvokableMemberAttributesToString(MyEventAttributes myEventAttributes, MyInvokableMemberAttributes myInvokableMemberAttributes) { // for now only MyInvokableMemberInfo attributes return(MyInvokableMemberInfo.MyInvokableMemberAttributesToString(myInvokableMemberAttributes)); }
private static string MyEventAndMyInvokableMemberAttributesToString(MyEventAttributes myEventAttributes, MyInvokableMemberAttributes myInvokableMemberAttributes) { // for now only MyInvokableMemberInfo attributes return MyInvokableMemberInfo.MyInvokableMemberAttributesToString(myInvokableMemberAttributes); }