Beispiel #1
0
 /// <inheritdoc />
 public void Register <TParameter, TResult>(IGenericExternalEventHandler <TParameter, TResult> handler)
 {
     ScopedRegisteredExternalEvents.TryAdd(handler.GetType(), new FutureExternalEvent(handler));
 }
Beispiel #2
0
 /// <summary>
 ///     Register an <see cref="IGenericExternalEventHandler{TParameter,TResult}" /> to globally to be
 ///     raised. If a global handler is not what you want, make use of a RevitTask instance to register a scoped handler
 /// </summary>
 /// <typeparam name="TParameter">
 ///     The type of the parameter that
 ///     <see cref="IGenericExternalEventHandler{TParameter,TResult}" /> accepts
 /// </typeparam>
 /// <typeparam name="TResult">
 ///     The type of result that <see cref="IGenericExternalEventHandler{TParameter,TResult}" />
 ///     generates
 /// </typeparam>
 /// <param name="handler">The instance of <see cref="IGenericExternalEventHandler{TParameter,TResult}" /></param>
 public static void RegisterGlobal <TParameter, TResult>(IGenericExternalEventHandler <TParameter, TResult> handler)
 {
     RegisteredExternalEvents.TryAdd(handler.GetType(), new ExternalEventPair(handler));
 }