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
instanceMbEvent<T1, T2>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2> to call "Invoke" against.
arg1T1Fist argument of the event.
arg2T2Second argument of the event.
Type Parameters
T1The type of the first event argument.
T2The 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
instanceMbEvent<T1, T2, T3>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3> to call "Invoke" against.
arg1T1Fist argument of the event.
arg2T2Second argument of the event.
arg3T3Third argument of the event.
Type Parameters
T1The type of the first event argument.
T2The type of the second event argument.
T3The 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
instanceMbEvent<T1, T2, T3, T4>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4> to call "Invoke" against.
arg1T1Fist argument of the event.
arg2T2Second argument of the event.
arg3T3Third argument of the event.
arg4T4Fourth argument of the event.
Type Parameters
T1The type of the first event argument.
T2The type of the second event argument.
T3The type of the third event argument.
T4The 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
instanceMbEvent<T1, T2, T3, T4, T5>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5> to call "Invoke" against.
arg1T1Fist argument of the event.
arg2T2Second argument of the event.
arg3T3Third argument of the event.
arg4T4Fourth argument of the event.
arg5T5Fifth argument of the event.
Type Parameters
T1The type of the first event argument.
T2The type of the second event argument.
T3The type of the third event argument.
T4The type of the fourth event argument.
T5The 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
instanceMbEvent<T1, T2, T3, T4, T5, T6>An instance of TaleWorlds.CampaignSystem.MbEvent<T1, T2, T3, T4, T5, T6> to call "Invoke" against.
arg1T1Fist argument of the event.
arg2T2Second argument of the event.
arg3T3Third argument of the event.
arg4T4Fourth argument of the event.
arg5T5Fifth argument of the event.
arg6T6Sixth argument of the event.
Type Parameters
T1The type of the first event argument.
T2The type of the second event argument.
T3The type of the third event argument.
T4The type of the fourth event argument.
T5The type of the fifth event argument.
T6The 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.