MonoTests.Mono.UIAutomation.Winforms.MockBridge.GetStructureChangedEventAt C# (CSharp) Method

GetStructureChangedEventAt() public method

public GetStructureChangedEventAt ( int index, StructureChangeType changeType ) : StructureChangedEventTuple
index int
changeType StructureChangeType
return StructureChangedEventTuple
		public StructureChangedEventTuple GetStructureChangedEventAt (int index,
		                                                              StructureChangeType changeType)
		{
			if (index >= StructureChangedEvents.Count || index < 0)
				return null;

			int counter = 0;
			foreach (StructureChangedEventTuple tuple in StructureChangedEvents) {
				if (tuple.e.StructureChangeType == changeType) {
					if (counter++ == index) 
					    return tuple;
				}
			}			
			
			return null;
		}