Example #1
0
        internal unsafe static IntPtr CreateNativeUriInstance(string rawUri)
        {
            char *ptr = rawUri;

            if (ptr != null)
            {
                ptr += RuntimeHelpers.OffsetToStringData / 2;
            }
            return(UriMarshaler.CreateNativeUriInstanceHelper(ptr, rawUri.Length));
        }
Example #2
0
        internal static unsafe IntPtr CreateNativeUriInstance(string rawUri)
        {
            string str     = rawUri;
            char * rawUri1 = (char *)str;

            if ((IntPtr)rawUri1 != IntPtr.Zero)
            {
                rawUri1 += RuntimeHelpers.OffsetToStringData;
            }
            return(UriMarshaler.CreateNativeUriInstanceHelper(rawUri1, rawUri.Length));
        }