Skip to content

Добавлен класс RevitEventHandler для работы с ExternalEvent#9

Open
vlastroG wants to merge 6 commits intodosymep:mainfrom
vlastroG:vlastroG/RevitEventHandler
Open

Добавлен класс RevitEventHandler для работы с ExternalEvent#9
vlastroG wants to merge 6 commits intodosymep:mainfrom
vlastroG:vlastroG/RevitEventHandler

Conversation

@vlastroG
Copy link
Contributor

RevitEventHandler

Реализация класса для регистрации событий ExternalEvent в Revit с выполнением заданного действия Revit'ом при возникновении этого события.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • перенеси класс в dosymep.Revit
  • сделай перегрузку с Func<T, UIApplication>

/// <param name="action">Делегат, который будет вызван при обработке события <see cref="Autodesk.Revit.UI.ExternalEvent"/>.</param>
/// <returns>Возвращает текущий объект <see cref="RevitEventHandler"/>.</returns>
/// <exception cref="System.ArgumentNullException">Исключение, если обязательный параметр null.</exception>
public RevitEventHandler SetTransactAction(Action<UIApplication> action) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделай перегрузку с Func<T, UIApplication>

/// Если в процессе выполнения <see cref="TransactAction"/> возникло исключение, оно будет выброшено здесь.
/// </summary>
public void GetResult() {
if(_exception != null) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вроде бы это делается не так

@dosymep dosymep force-pushed the main branch 4 times, most recently from 98d4901 to 1178811 Compare February 5, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants