コード例 #1
0
        private CilContextRef GetContext()
        {
            var contextType = GetContextType();
            var contextRef  = Method.IsStatic ? CilContextRef.None : CilContextRef.ByType(contextType);

            return(contextRef);
        }
コード例 #2
0
        private CilContextRef GetContext(MethodInfo method, bool hasThis)
        {
            if (method.IsStatic || hasThis)
            {
                return(CilContextRef.None);
            }

            var contextType = GetContextType();

            // Local or global context identified by type
            return(CilContextRef.ByType(contextType));
        }
コード例 #3
0
 private CilContextRef GetContext()
 {
     return(Method.IsStatic ? CilContextRef.None : CilContextRef.ByType(GetContextType()));
 }