Exemplo n.º 1
0
        public static Precode Create(IntPtr methodPtr)
        {
            if (StubPrecode.IsStubPrecode(methodPtr))
            {
                return(StubPrecode.Create(methodPtr));
            }

            if (FixupPrecode.IsFixupPrecode(methodPtr))
            {
                return(FixupPrecode.Create(methodPtr));
            }

            if (RemotingPrecode.IsRemotingPrecode(methodPtr))
            {
                return(RemotingPrecode.Create(methodPtr));
            }

            throw new NotSupportedException("Not supported precode type.");
        }
Exemplo n.º 2
0
 public static bool HasPrecode(IntPtr methodPtr)
 {
     return(StubPrecode.IsStubPrecode(methodPtr) ||
            FixupPrecode.IsFixupPrecode(methodPtr) ||
            RemotingPrecode.IsRemotingPrecode(methodPtr));
 }