Table of Contents

Namespace SampSharp.OpenMp.Core

Classes

Extension

Represents a base class for managed extensions which can be attached to extensible open.mp entities. The implementation must have an [Extension(...)] attribute.

ExtensionAttribute

Provides a unique identifier for an extension.

LoggerTextWriter

A text writer that writes to the open.mp logger.

NumberedTypeGeneratorAttribute

This attribute marks a type which should be cloned by the source generator with a changed constant field value. This type is mainly used by HybridString16 and related types.

OpenMpApiAttribute

This attributes marks a struct as an open.mp API interface. The struct must be marked as partial. All partial methods in the struct will be considered as open.mp API functions and will have P/Invoke implementations generated by the source generator. The invoked function name will be {interface}_{method_in_pascalCase}{overloadAppendix}. For example for the function IConfig.RemoveBan, the C function will be IConfig_removeBan. The overload appendix can be controlled using the OpenMpApiOverloadAttribute .

OpenMpApiFunctionAttribute

Specifies the name of the open.mp API function that this method represents. By default, the name of the method converted to camel case is used as the function name.

OpenMpApiOverloadAttribute

Specifies the overload name to append to the open.mp API function name. For example, if overload is "_index" for IConfig.RemoveBan, the C function will be "IConfig_removeBan_index".

OpenMpApiPartialAttribute

This attribute marks an open.mp API interface struct as partial. Partial API structs will not implement their own managed interface.

OpenMpEventHandlerAttribute

This attributes marks an interface as an open.mp event handler. The interface must be marked as partial.

SampSharpExceptionHandler

Provides a way to handle exceptions within SampSharp that would otherwise be unhandled.

StartupContext

Represents the context in which the application is started.

StartupContextLoggingExtensions

Provides extension methods related to open.mp logging for the IStartupContext.

StartupContextThreadingExtensions

Provides extension methods for IStartupContext related to threading.

TaskHelper

Provides helper methods for dealing with tasks.

Structs

BlittableBoolean

Represents a blittable boolean value. That is, a boolean value that is represented in memory as a single byte.

BlittableRef<T>

Represents a pointer to an unmanaged value.

BlittableStructRef<T>

Represents a pointer to a structure.

MainThreadTaskAwaiter

Represents an awaiter for the SyncToMainThreadTask.

SampSharpInfo

Provides information about the SampSharp open.mp component.

SampSharpInitParams

Provides the parameters for initializing the SampSharp application as provided by the SampSharp open.mp component.

SyncToMainThreadTask

Represents a task which, when awaited, will switch the continuation to the main thread.

Interfaces

IStartup

Provides methods for initializing a SampSharp application.

IStartupContext

Provides the properties and events which provide context to the startup of the application.

IUnmanagedInterface

Provides the methods to work with structs which represent pointers to open.mp interfaces. This interface is the managed counterpart the unmanaged interface.

Delegates

ExceptionHandler

Represents a method that handles exceptions.