Exemplo n.º 1
0
        /* Resolve any GenParams in constraints, parent & impl_list */
        private void ResolveGenParams()
        {
            if (gen_params == null)
            {
                return;
            }

            gen_params.ResolveConstraints(gen_params, null);

            BaseGenericTypeRef gtr = parent as BaseGenericTypeRef;

            if (gtr != null)
            {
                gtr.Resolve(gen_params, null);
            }

            if (impl_list == null)
            {
                return;
            }

            foreach (BaseClassRef impl in impl_list)
            {
                gtr = impl as BaseGenericTypeRef;
                if (gtr != null)
                {
                    gtr.Resolve(gen_params, null);
                }
            }
        }
Exemplo n.º 2
0
        public void ResolveGenParams()
        {
            GenericParameters type_params = (type_def != null) ? type_def.TypeParameters : null;

            if (gen_params == null && type_params == null)
            {
                return;
            }

            if (gen_params != null)
            {
                gen_params.ResolveConstraints(type_params, gen_params);
            }

            BaseGenericTypeRef gtr = RetType as BaseGenericTypeRef;

            if (gtr != null)
            {
                gtr.Resolve(type_params, gen_params);
            }

            if (param_list == null)
            {
                return;
            }

            foreach (ParamDef param in param_list)
            {
                gtr = param.Type as BaseGenericTypeRef;
                if (gtr != null)
                {
                    gtr.Resolve(type_params, gen_params);
                }
            }
        }