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

EnsureStructureEventsSetUp() private method

private EnsureStructureEventsSetUp ( Mono.UIAutomation.UiaDbus.Interfaces app, string busName ) : void
app Mono.UIAutomation.UiaDbus.Interfaces
busName string
return void
		private void EnsureStructureEventsSetUp (DCI.IApplication app, string busName)
		{
			if (!structureEventBusNames.Contains (busName)) {
				structureEventBusNames.Add (busName);
				app.StructureChanged += delegate (int hId, int evtId, string providerPath,
				                                  StructureChangeType changeType) {
					var handler = eventHandlerManager.GetStructureEventHandlerById (hId);
					if (handler != null) {
						UiaDbusElement elem = GetOrCreateElement (busName, providerPath);
						AutomationElement ae = SourceManager.GetOrCreateAutomationElement (elem);
						var args = new StructureChangedEventArgs (changeType, elem.RuntimeId);
						handler (ae, args);
					}
				};
			}
		}