private static List <AFEventFrame> FindEventFramesByAttribute(string elementName, AFAttributeValueQuery afAttributeValueQuery, int page = 0, int maxCount = Int32.MaxValue) { return(AFEventFrame.FindEventFramesByAttribute( null, // Search root AFSearchMode.Inclusive, // Search mode AFTime.MinValue, // Start time AFTime.MaxValue, // End time null, // Name filter elementName, // Referenced name filter null, // Duration query new[] { afAttributeValueQuery }, // Value query true, // Search full hierarchy AFSortField.ID, // Sort field AFSortOrder.Ascending, // Sort order page * pagesize, // Start index maxCount).ToList()); // Max count }