Interface INameDataShareAdapter
An interface to provide live IPC adapters that can invoke methods directly using names without the runtime overhead of IPC queries.
Remarks
Implement only whichever type of methods suits you best. This can then be used to create a wrapper encapsulating the actually available methods or properties, either by the provider library, or on the consumer side.
Assembly: Dalamud.dll
public interface INameDataShareAdapter : IDisposable
Methods
Invoke(string)
Try to invoke an action by its name using generic arguments.
void Invoke(string methodName)
Parameters
| Type | Name | Description |
|---|---|---|
System.String | methodName | The name of the method to invoke. |
Remarks
Should throw Dalamud.Plugin.Ipc.AdapterMethodMissingException if the requested method does not exist.
Should throw Dalamud.Plugin.Ipc.AdapterTypeMismatchException if the requested method can not handle a provided argument.
The method should generally be implemented as a switch-statement.
Invoke<T1>(string, T1)
Try to invoke an action by its name using generic arguments.
void Invoke<T1>(string methodName, T1 argument1) where T1 : allows ref struct
Parameters
| Type | Name | Description |
|---|---|---|
System.String | methodName | The name of the method to invoke. |
<T1> | argument1 | The first argument. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first parameter type. This needs to be a type known to Dalamud again. |
Remarks
Should throw Dalamud.Plugin.Ipc.AdapterMethodMissingException if the requested method does not exist.
Should throw Dalamud.Plugin.Ipc.AdapterTypeMismatchException if the requested method can not handle a provided argument.
The method should generally be implemented as a switch-statement.
Invoke<T1, T2>(string, T1, T2)
Try to invoke an action by its name using generic arguments.
void Invoke<T1, T2>(string methodName, T1 argument1, T2 argument2) where T1 : allows ref struct where T2 : allows ref struct
Parameters
| Type | Name | Description |
|---|---|---|
System.String | methodName | The name of the method to invoke. |
<T1> | argument1 | The first argument. |
<T2> | argument2 | The second argument. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first parameter type. This needs to be a type known to Dalamud again. |
T2 | The second parameter type. This needs to be a type known to Dalamud again. |
Remarks
Should throw Dalamud.Plugin.Ipc.AdapterMethodMissingException if the requested method does not exist.
Should throw Dalamud.Plugin.Ipc.AdapterTypeMismatchException if the requested method can not handle a provided argument.
The method should generally be implemented as a switch-statement.
Invoke<T1, T2, T3>(string, T1, T2, T3)
Try to invoke an action by its name using generic arguments.
void Invoke<T1, T2, T3>(string methodName, T1 argument1, T2 argument2, T3 argument3) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct
Parameters
| Type | Name | Description |
|---|---|---|
System.String | methodName | The name of the method to invoke. |
<T1> | argument1 | The first argument. |
<T2> | argument2 | The second argument. |
<T3> | argument3 | The third argument. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first parameter type. This needs to be a type known to Dalamud again. |
T2 | The second parameter type. This needs to be a type known to Dalamud again. |
T3 | The third parameter type. This needs to be a type known to Dalamud again. |
Remarks
Should throw Dalamud.Plugin.Ipc.AdapterMethodMissingException if the requested method does not exist.
Should throw Dalamud.Plugin.Ipc.AdapterTypeMismatchException if the requested method can not handle a provided argument.
The method should generally be implemented as a switch-statement.
Invoke<T1, T2, T3, T4>(string, T1, T2, T3, T4)
Try to invoke an action by its name using generic arguments.
void Invoke<T1, T2, T3, T4>(string methodName, T1 argument1, T2 argument2, T3 argument3, T4 argument4) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct
Parameters
| Type | Name | Description |
|---|---|---|
System.String | methodName | The name of the method to invoke. |
<T1> | argument1 | The first argument. |
<T2> | argument2 | The second argument. |
<T3> | argument3 | The third argument. |
<T4> | argument4 | The fourth argument. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first parameter type. This needs to be a type known to Dalamud again. |
T2 | The second parameter type. This needs to be a type known to Dalamud again. |
T3 | The third parameter type. This needs to be a type known to Dalamud again. |
T4 | The fourth parameter type. This needs to be a type known to Dalamud again. |
Remarks
Should throw Dalamud.Plugin.Ipc.AdapterMethodMissingException if the requested method does not exist.
Should throw Dalamud.Plugin.Ipc.AdapterTypeMismatchException if the requested method can not handle a provided argument.
The method should generally be implemented as a switch-statement.
Invoke<T1, T2, T3, T4, T5>(string, T1, T2, T3, T4, T5)
Try to invoke an action by its name using generic arguments.
void Invoke<T1, T2, T3, T4, T5>(string methodName, T1 argument1, T2 argument2, T3 argument3, T4 argument4, T5 argument5) where T1 : allows ref struct where T2 : allows ref struct where T3 : allows ref struct where T4 : allows ref struct where T5 : allows ref struct
Parameters
| Type | Name | Description |
|---|---|---|
System.String | methodName | The name of the method to invoke. |
<T1> | argument1 | The first argument. |
<T2> | argument2 | The second argument. |
<T3> | argument3 | The third argument. |
<T4> | argument4 | The fourth argument. |
<T5> | argument5 | The fifth argument. |
Type Parameters
| Name | Description |
|---|---|
T1 | The first parameter type. This needs to be a type known to Dalamud again. |
T2 | The second parameter type. This needs to be a type known to Dalamud again. |
T3 | The third parameter type. This needs to be a type known to Dalamud again. |
T4 | The fourth parameter type. This needs to be a type known to Dalamud again. |
T5 | The fifth parameter type. This needs to be a type known to Dalamud again. |