Method Register<T>
- Namespace
- MaaFramework.Binding
- Assembly
- MaaFramework.Binding.Native.dll
Register<T>(string, T)
Registers a MaaFramework.Binding.Custom.IMaaCustomAction or MaaFramework.Binding.Custom.IMaaCustomRecognition in the MaaFramework.Binding.IMaaAgentServer.
public MaaAgentServer Register<T>(string name, T custom) where T : IMaaCustomResourceParameters
namestring-
The new name that will be used to reference the custom resource.
customT-
The custom resource instance to register.
Returns
Type Parameters
T-
The MaaFramework.Binding.Custom.IMaaCustomAction or MaaFramework.Binding.Custom.IMaaCustomRecognition.
Exceptions
- MaaInteroperationException
-
Thrown if the registration fails.
Register<T>(string?)
public MaaAgentServer Register<T>(string? name = null) where T : IMaaCustomResource, new()Parameters
namestring?
Returns
Type Parameters
T
Register<T>(T)
Registers a MaaFramework.Binding.Custom.IMaaCustomAction or MaaFramework.Binding.Custom.IMaaCustomRecognition in the MaaFramework.Binding.IMaaAgentServer.
public MaaAgentServer Register<T>(T custom) where T : IMaaCustomResourceParameters
customT-
The custom resource instance to register.
Returns
Type Parameters
T-
The MaaFramework.Binding.Custom.IMaaCustomAction or MaaFramework.Binding.Custom.IMaaCustomRecognition.
Remarks
Wrapper of MaaFramework.Binding.Interop.Native.MaaAgentServer.MaaAgentServerRegisterCustomAction(System.String,MaaFramework.Binding.Interop.Native.MaaCustomActionCallback,System.IntPtr) and MaaFramework.Binding.Interop.Native.MaaAgentServer.MaaAgentServerRegisterCustomRecognition(System.String,MaaFramework.Binding.Interop.Native.MaaCustomRecognitionCallback,System.IntPtr).
Exceptions
- MaaInteroperationException
-
Thrown if the registration fails.