public static void Main(string[] args)
        {
            Console.WriteLine("hello world");
            Class1.Foo();

#if TEST_XElement
            var doc1 = new XElement("request");

#if FEATURE_XElement
            Console.WriteLine(doc1.XMethod2().ToString());
#else
            var _doc1 = doc1.ToString();
            Console.WriteLine("calling XMethod2: " + _doc1);
            var _result1 = _doc1.XMethod2();
            Console.WriteLine("returned XMethod2: " + _result1);

            Console.WriteLine(XElement.Parse(_result1).ToString());
#endif
#endif

            //var x = new CLRProgram();
            //ExtensionsToSwitchToCLRContext.StaticMethod1("hello");

            var retval1 = new IntPtrInfo(IntPtr.Size);

            "jvm".StaticMethod1(retval1);



            //Console.WriteLine("r: 0x" + r.ToString("x8"));
            Console.WriteLine("r: " + Marshal.PtrToStringAnsi(retval1.IntPtrValue));

            //var r1 = Marshal.PtrToStringAnsi(r);
            //Marshal.FreeHGlobal(r);
            ExtensionsToSwitchToCLRContext.StaticMethod1_free(retval1);
            Marshal.FreeHGlobal(retval1);

            //Console.WriteLine("r1: " + r1);
        }
 public static IntPtr GetIntPtrValue(IntPtrInfo e)
 {
     return e.IntPtrValue;
 }
 public static IntPtr ToPointer(IntPtrInfo e)
 {
     return e;
 }
 public static void Dispose(IntPtrInfo e)
 {
     e.Dispose();
 }
 public static void SetIntPtrValue(IntPtrInfo e, IntPtr value)
 {
     e.IntPtrValue = value;
 }
Exemple #6
0
 public static IntPtr GetIntPtrValue(IntPtrInfo e)
 {
     return(e.IntPtrValue);
 }
Exemple #7
0
 public static IntPtr ToPointer(IntPtrInfo e)
 {
     return(e);
 }
Exemple #8
0
 public static void Dispose(IntPtrInfo e)
 {
     e.Dispose();
 }
Exemple #9
0
 public static void SetIntPtrValue(IntPtrInfo e, IntPtr value)
 {
     e.IntPtrValue = value;
 }