Table of Contents

Class StringViewMarshaller

Namespace
SampSharp.OpenMp.Core.Std
Assembly
SampSharp.OpenMp.Core.dll

Represents a marshaller entrypoint for marshalling string to a native StringView structure.

[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedIn, typeof(StringViewMarshaller.ManagedToNative))]
[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedOut, typeof(StringViewMarshaller.ManagedToNative))]
[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedOut, typeof(StringViewMarshaller.NativeToManaged))]
[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedIn, typeof(StringViewMarshaller.NativeToManaged))]
[CustomMarshaller(typeof(string), MarshalMode.ManagedToUnmanagedRef, typeof(StringViewMarshaller.Bidirectional))]
[CustomMarshaller(typeof(string), MarshalMode.UnmanagedToManagedRef, typeof(StringViewMarshaller.Bidirectional))]
public static class StringViewMarshaller
Inheritance
StringViewMarshaller
Inherited Members

Properties

Encoding

Encoding used for every managed and native string crossing this marshaller. Defaults to UTF-8 (what open.mp clients speak). Gamemodes targeting clients with Cyrillic chat usually set this to Windows-1251 at startup (requires System.Text.Encoding.CodePages

  • Encoding.RegisterProvider(CodePagesEncodingProvider.Instance)).
public static Encoding Encoding { get; set; }

Property Value

Encoding