Пример #1
0
        public override void OnCallableTypeReference(CallableTypeReference node)
        {
            var ns = typeof(Func <>).Namespace;

            Usings.Add(ns);
            _namespacesSeen.Add(ns);
        }
Пример #2
0
 override public void OnCallableTypeReference(CallableTypeReference node)
 {
     Write("callable(");
     WriteCommaSeparatedList(node.Parameters);
     Write(")");
     WriteTypeReference(node.ReturnType);
 }
Пример #3
0
        private CallableSignature CallableSignatureFor(CallableTypeReference node)
        {
            var parameters = new IParameter[node.Parameters.Count];

            for (int i = 0; i < parameters.Length; ++i)
            {
                parameters[i] = new InternalParameter(node.Parameters[i], i);
            }

            var returnType = node.ReturnType != null
                   ? GetType(node.ReturnType)
                   : TypeSystemServices.VoidType;

            return(new CallableSignature(parameters, returnType, node.Parameters.HasParamArray));
        }
Пример #4
0
        override public void LeaveCallableTypeReference(CallableTypeReference node)
        {
            IParameter[] parameters = new IParameter[node.Parameters.Count];
            for (int i = 0; i < parameters.Length; ++i)
            {
                parameters[i] = new InternalParameter(node.Parameters[i], i);
            }

            IType returnType = null;

            if (null != node.ReturnType)
            {
                returnType = GetType(node.ReturnType);
            }
            else
            {
                returnType = TypeSystemServices.VoidType;
            }

            node.Entity = TypeSystemServices.GetConcreteCallableType(node, new CallableSignature(parameters, returnType));
        }
Пример #5
0
 public override void OnCallableTypeReference(CallableTypeReference node)
 {
     base.OnCallableTypeReference(node);
     OnTypeReference(node);
 }
Пример #6
0
 public override void OnCallableTypeReference(CallableTypeReference node)
 {
     throw new NotImplementedException();
     IL_0006 :;
 }
Пример #7
0
 override public void LeaveCallableTypeReference(CallableTypeReference node)
 {
     OnTypeReference(node);
 }
Пример #8
0
 public override void OnCallableTypeReference(CallableTypeReference node)
 {
     MakeTypeResult(ConvertType(node));
 }
Пример #9
0
 override public void LeaveCallableTypeReference(CallableTypeReference node)
 {
     node.Entity = TypeSystemServices.GetConcreteCallableType(node, CallableSignatureFor(node));
 }