Esempio n. 1
0
            public bool Initialize()
            {
                MethodInfo mi = typeof(ILGenerator).GetMethod(
                    "Mono_GetCurrentOffset",
                    BindingFlags.Static | BindingFlags.NonPublic);

                if (mi == null)
                {
                    return(false);
                }

                get_il_offset_func = (GetILOffsetFunc)System.Delegate.CreateDelegate(
                    typeof(GetILOffsetFunc), mi);

                mi = typeof(ModuleBuilder).GetMethod(
                    "Mono_GetGuid",
                    BindingFlags.Static | BindingFlags.NonPublic);
                if (mi == null)
                {
                    return(false);
                }

                get_guid_func = (GetGuidFunc)System.Delegate.CreateDelegate(
                    typeof(GetGuidFunc), mi);

                Location.DefineSymbolDocuments(this);

                return(true);
            }
        static void Initialize()
        {
            var mi = typeof(ILGenerator).GetMethod(
                "Mono_GetCurrentOffset",
                BindingFlags.Static | BindingFlags.NonPublic);

            if (mi == null)
            {
                throw new MissingMethodException("Mono_GetCurrentOffset");
            }

            get_il_offset_func = (GetILOffsetFunc)System.Delegate.CreateDelegate(
                typeof(GetILOffsetFunc), mi);

            mi = typeof(ModuleBuilder).GetMethod(
                "Mono_GetGuid",
                BindingFlags.Static | BindingFlags.NonPublic);
            if (mi == null)
            {
                throw new MissingMethodException("Mono_GetGuid");
            }

            get_guid_func = (GetGuidFunc)System.Delegate.CreateDelegate(
                typeof(GetGuidFunc), mi);
        }
Esempio n. 3
0
			public bool Initialize ()
			{
#if !NET_4_0
				MethodInfo mi;

				mi = typeof (ILGenerator).GetMethod (
					"Mono_GetCurrentOffset",
					BindingFlags.Static | BindingFlags.NonPublic);
				if (mi == null)
					return false;

				get_il_offset_func = (GetILOffsetFunc) System.Delegate.CreateDelegate (
					typeof (GetILOffsetFunc), mi);

				mi = typeof (ModuleBuilder).GetMethod (
					"Mono_GetGuid",
					BindingFlags.Static | BindingFlags.NonPublic);
				if (mi == null)
					return false;

				get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
					typeof (GetGuidFunc), mi);
#endif

				Location.DefineSymbolDocuments (this);
				return true;
			}
Esempio n. 4
0
        static MonoDebuggerSupport()
        {
            get_method_token = (GetMethodTokenFunc)create_delegate(
                typeof(Assembly), typeof(GetMethodTokenFunc),
                "MonoDebugger_GetMethodToken");

            get_guid = (GetGuidFunc)create_delegate(
                typeof(Module), typeof(GetGuidFunc), "Mono_GetGuid");
        }
        static MonoDebuggerSupport()
        {
            get_method_token = (GetMethodTokenFunc)create_delegate(
                typeof(Assembly), typeof(GetMethodTokenFunc),
                "MonoDebugger_GetMethodToken");

            get_guid = (GetGuidFunc)create_delegate(
                typeof(Module), typeof(GetGuidFunc), "Mono_GetGuid");

            get_local_index = (GetLocalIndexFunc)create_delegate(
                typeof(SRE.LocalBuilder), typeof(GetLocalIndexFunc),
                "Mono_GetLocalIndex");
        }
Esempio n. 6
0
		public void Close ()
		{
			MethodInfo mi = typeof (ModuleBuilder).GetMethod (
				"Mono_GetGuid",
				BindingFlags.Static | BindingFlags.NonPublic);
			if (mi == null)
				return;

			get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
				typeof (GetGuidFunc), mi);
			
			msw.WriteSymbolFile (get_guid_func (mb));
		}
Esempio n. 7
0
        public void Close()
        {
            MethodInfo mi = typeof(ModuleBuilder).GetMethod(
                "Mono_GetGuid",
                BindingFlags.Static | BindingFlags.NonPublic);

            if (mi == null)
            {
                return;
            }

            get_guid_func = (GetGuidFunc)System.Delegate.CreateDelegate(
                typeof(GetGuidFunc), mi);

            msw.WriteSymbolFile(get_guid_func(mb));
        }
Esempio n. 8
0
		static void Initialize ()
		{
			var mi = typeof (ILGenerator).GetMethod (
				"Mono_GetCurrentOffset",
				BindingFlags.Static | BindingFlags.NonPublic);
			if (mi == null)
				throw new MissingMethodException ("Mono_GetCurrentOffset");

			get_il_offset_func = (GetILOffsetFunc) System.Delegate.CreateDelegate (
				typeof (GetILOffsetFunc), mi);

			mi = typeof (ModuleBuilder).GetMethod (
				"Mono_GetGuid",
				BindingFlags.Static | BindingFlags.NonPublic);
			if (mi == null)
				throw new MissingMethodException ("Mono_GetGuid");

			get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
				typeof (GetGuidFunc), mi);
		}
Esempio n. 9
0
		static MonoDebuggerSupport ()
		{
			get_method_token = (GetMethodTokenFunc) create_delegate (
				typeof (Assembly), typeof (GetMethodTokenFunc),
				"MonoDebugger_GetMethodToken");

			get_guid = (GetGuidFunc) create_delegate (
				typeof (Module), typeof (GetGuidFunc), "Mono_GetGuid");

			get_local_index = (GetLocalIndexFunc) create_delegate (
				typeof (SRE.LocalBuilder), typeof (GetLocalIndexFunc),
				"Mono_GetLocalIndex");
		}
Esempio n. 10
0
		static MonoDebuggerSupport ()
		{
			get_method_token = (GetMethodTokenFunc) create_delegate (
				typeof (Assembly), typeof (GetMethodTokenFunc),
				"MonoDebugger_GetMethodToken");

			get_guid = (GetGuidFunc) create_delegate (
				typeof (Module), typeof (GetGuidFunc), "Mono_GetGuid");
		}