Beispiel #1
0
        private static IField ResolveField(IMethod currentMethod, IField field, Instruction instr)
        {
            var declType = field.DeclaringType;

            declType = ResolveType(currentMethod, declType, instr);

            CheckInstantiation(declType, instr);

            if (declType.IsGenericInstance())
            {
                var proxy = GenericType.FindFieldProxy(declType, field);
                if (proxy != null)
                {
                    return(proxy);
                }
            }

            CheckInstantiation(field.Type, instr);

            return(field);
        }