Пример #1
0
 /// <summary>
 /// Cast a delegate from one type to another. Compatible with delegates holding an invocation list (combined delegates).
 /// </summary>
 /// <param name="source">The input delegate.</param>
 /// <returns>The output delegate.</returns>
 public static T CastDelegate <T>(this Delegate source) where T : class => source.CastDelegate(typeof(T)) as T;
Пример #2
0
 public void Modify(Delegate hookDelegate)
 {
     _Add(_NewILHook, hookDelegate.CastDelegate <ILContext.Manipulator>());
 }