(string str)
| 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) |
no test coverage detected