Ejemplo n.º 1
0
        public GenericInterMethodWrapper(InterMethod method, IntermediateBuilder context, InterGenericType type) : base(method, context)
        {
            _type = type;

            if (method.ReturnType is GenericParameterType)
            {
                var par = method.ReturnType as GenericParameterType;
                _returnType = new GenericParameterType(_type.GenericParameters[par.Index], par.Index);
            }
            else
            {
                _returnType = method.ReturnType;
            }

            _returnType = _type.InstantiateGenericType(method.ReturnType);


            _args = new CodeType[method.Arguments.Length];

            for (int i = 0; i < _args.Length; i++)
            {
                var p = method.Arguments[i];
                p.Bind(context);

                _args[i] = _type.InstantiateGenericType(p.Type);
            }
        }
Ejemplo n.º 2
0
 public void SetOwner(InterMethod method)
 => Owner = method;
Ejemplo n.º 3
0
 public InterMethodWrapper(InterMethod method, IntermediateBuilder context)
 {
     _method = method; _context = context;                                                                         /*foreach (var a in _method.Arguments) { a.Bind(context); }*/
 }
Ejemplo n.º 4
0
 public void AddMethod(InterMethod method)
 => Methods = Methods.Add(method);
Ejemplo n.º 5
0
 public void SetSet(InterMethod method)
 => Set = method;
Ejemplo n.º 6
0
 public void SetGet(InterMethod method)
 => Get = method;