Example #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);
        }
Example #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;
			}
Example #4
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);
		}