MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ToNative

Method ToNative

Source/Engine/Engine/NativeInterop.Managed.cs:309–318  ·  view source on GitHub ↗
(string str)

Source from the content-addressed store, hash-verified

307 internal static ManagedHandle EmptyStringHandle = ManagedHandle.Alloc(string.Empty);
308
309 [System.Diagnostics.DebuggerStepThrough]
310 public static unsafe IntPtr ToNative(string str)
311 {
312 if (str == null)
313 return IntPtr.Zero;
314 else if (str == string.Empty)
315 return ManagedHandle.ToIntPtr(EmptyStringHandle);
316 Assert.IsTrue(str.Length > 0);
317 return ManagedHandle.ToIntPtr(str);
318 }
319
320 [System.Diagnostics.DebuggerStepThrough]
321 public static unsafe IntPtr ToNativeWeak(string str)

Callers 15

MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45
MarshalAndInvokeMethod · 0.45

Calls 2

ToIntPtrMethod · 0.80
IsTrueMethod · 0.45

Tested by

no test coverage detected