Mono.UIAutomation.UiaDbusSource.UiaDbusAutomationSource.EnsureAutomationEventsSetUp C# (CSharp) Method

EnsureAutomationEventsSetUp() private method

private EnsureAutomationEventsSetUp ( Mono.UIAutomation.UiaDbus.Interfaces app, string busName ) : void
app Mono.UIAutomation.UiaDbus.Interfaces
busName string
return void
		private void EnsureAutomationEventsSetUp (DCI.IApplication app, string busName)
		{
			if (!automationEventBusNames.Contains (busName)) {
				automationEventBusNames.Add (busName);
				app.AutomationEvent += delegate (int hId, int evtId, string providerPath) {
					var handler = eventHandlerManager.GetAutomationEventHandlerById (hId);
					if (handler != null) {
						UiaDbusElement elem = GetOrCreateElement (busName, providerPath);
						AutomationElement ae = SourceManager.GetOrCreateAutomationElement (elem);
						var args = new AutomationEventArgs (AutomationEvent.LookupById (evtId));
						handler (ae, args);
					}
				};
			}
		}