Class MbEventExtensions
- Namespace
- Bannerlord.ButterLib.Common.Extensions
- Assembly
- Bannerlord.ButterLib.dll
Extension class of the TaleWorlds.CampaignSystem.MbEvent class and its generic variations.
public static class MbEventExtensions
- Inheritance
-
MbEventExtensions
- Inherited Members
Remarks
For some reason TW hid "Invoke" methods of the MbEvent classes with number of generic arguments greater than one. This extension class corrects said misconception.
Methods
Invoke<T1, T2>(MbEvent<T1, T2>, T1, T2)
Invokes all the listeners to the specified TaleWorlds.CampaignSystem.MbEvent<T1, T2>.
public static void Invoke<T1, T2>(this MbEvent<T1, T2> instance, T1 arg1, T2 arg2)
Parameters
instance
MbEvent<T1, T2>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2> to call "Invoke" against.
arg1
T1Fist argument of the event.
arg2
T2Second argument of the event.
Type Parameters
T1
The type of the first event argument.
T2
The type of the second event argument.
Remarks
This is accomplished by calling a delegate on the private method called "Invoke" of the TaleWorlds.CampaignSystem.MbEvent<T1, T2>, which guarantees fast and native execution.
Invoke<T1, T2, T3>(MbEvent<T1, T2, T3>, T1, T2, T3)
Invokes all the listeners to the specified TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3>.
public static void Invoke<T1, T2, T3>(this MbEvent<T1, T2, T3> instance, T1 arg1, T2 arg2, T3 arg3)
Parameters
instance
MbEvent<T1, T2, T3>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3> to call "Invoke" against.
arg1
T1Fist argument of the event.
arg2
T2Second argument of the event.
arg3
T3Third argument of the event.
Type Parameters
T1
The type of the first event argument.
T2
The type of the second event argument.
T3
The type of the third event argument.
Remarks
This is accomplished by calling a delegate on the private method called "Invoke" of the TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3>, which guarantees fast and native execution.
Invoke<T1, T2, T3, T4>(MbEvent<T1, T2, T3, T4>, T1, T2, T3, T4)
Invokes all the listeners to the specified TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4>.
public static void Invoke<T1, T2, T3, T4>(this MbEvent<T1, T2, T3, T4> instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
Parameters
instance
MbEvent<T1, T2, T3, T4>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4> to call "Invoke" against.
arg1
T1Fist argument of the event.
arg2
T2Second argument of the event.
arg3
T3Third argument of the event.
arg4
T4Fourth argument of the event.
Type Parameters
T1
The type of the first event argument.
T2
The type of the second event argument.
T3
The type of the third event argument.
T4
The type of the fourth event argument.
Remarks
This is accomplished by calling a delegate on the private method called "Invoke" of the TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4>, which guarantees fast and native execution.
Invoke<T1, T2, T3, T4, T5>(MbEvent<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5)
Invokes all the listeners to the specified TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5>.
public static void Invoke<T1, T2, T3, T4, T5>(this MbEvent<T1, T2, T3, T4, T5> instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Parameters
instance
MbEvent<T1, T2, T3, T4, T5>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5> to call "Invoke" against.
arg1
T1Fist argument of the event.
arg2
T2Second argument of the event.
arg3
T3Third argument of the event.
arg4
T4Fourth argument of the event.
arg5
T5Fifth argument of the event.
Type Parameters
T1
The type of the first event argument.
T2
The type of the second event argument.
T3
The type of the third event argument.
T4
The type of the fourth event argument.
T5
The type of the fifth event argument.
Remarks
This is accomplished by calling a delegate on the private method called "Invoke" of the TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5>, which guarantees fast and native execution.
Invoke<T1, T2, T3, T4, T5, T6>(MbEvent<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6)
Invokes all the listeners to the specified TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5, T6>.
public static void Invoke<T1, T2, T3, T4, T5, T6>(this MbEvent<T1, T2, T3, T4, T5, T6> instance, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
Parameters
instance
MbEvent<T1, T2, T3, T4, T5, T6>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5, T6> to call "Invoke" against.
arg1
T1Fist argument of the event.
arg2
T2Second argument of the event.
arg3
T3Third argument of the event.
arg4
T4Fourth argument of the event.
arg5
T5Fifth argument of the event.
arg6
T6Sixth argument of the event.
Type Parameters
T1
The type of the first event argument.
T2
The type of the second event argument.
T3
The type of the third event argument.
T4
The type of the fourth event argument.
T5
The type of the fifth event argument.
T6
The type of the sixth event argument.
Remarks
This is accomplished by calling a delegate on the private method called "Invoke" of the TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5, T6>, which guarantees fast and native execution.