mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-01 16:28:36 -04:00
19 lines
472 B
C#
19 lines
472 B
C#
namespace Facepunch.InteropGen;
|
|
|
|
//
|
|
// Note: Only supporting passing string to native right now
|
|
//
|
|
[TypeName( "stringtoken" )]
|
|
public class ArgStringToken : Arg
|
|
{
|
|
public override string ManagedType => "Sandbox.StringToken";
|
|
public override string NativeType => "uint32";
|
|
|
|
public override string FromInterop( Side side, string code = null )
|
|
{
|
|
code ??= Name;
|
|
|
|
return side == Side.Native ? $"StringTokenFromHashCode( {code} )" : base.ToInterop( side, code );
|
|
}
|
|
}
|