internal async Task<bool> IsAssignableAsync(TypeDescriptor t1, PropGraphNodeDescriptor analysisNode)
        {
            // Contract.Assert(this.codeProvider!=null);
            if (codeProvider == null)
            {
                return true;
            }

            var res = true;
            // Ugly
            TypeDescriptor type1 = t1;

            var type2 = analysisNode.Type;

            if (!(await this.codeProvider.IsSubtypeAsync(type1, type2)))
            {
                if (!type2.IsDelegate)
                {
                    if (!IsCallNode(analysisNode) && !IsDelegateCallNode(analysisNode))
                    {
                        return false;
                    }
                }
            }
            return res;
        }
 public VariableNode(string name, TypeDescriptor declaredType)
     : base(name, declaredType)
 {
 }
 public UnsupportedNode(TypeDescriptor declaredType)
     : base("unsupported", declaredType)
 {
 }
 public TypeDescriptor(TypeDescriptor typeDescriptor, bool isConcrete = true)
 {
     this.TypeName = typeDescriptor.TypeName;
     this.IsReferenceType = typeDescriptor.IsReferenceType;
     this.Kind = typeDescriptor.Kind;
     this.IsConcreteType = isConcrete;
 }
 public ThisNode(TypeDescriptor declaredType)
     : base("this", declaredType)
 {
 }
 public ReturnNode(TypeDescriptor declaredType)
     : base("return", declaredType)
 {
 }
 protected PropGraphNodeDescriptor(string name, TypeDescriptor declaredType)
 {
     this.Type = declaredType;
     this.Name = name;
 }
 public PropertyVariableNode(string name, TypeDescriptor declaredType,
     AnalysisCallNode propertyMethod)
     : base(name, declaredType)
 {
     this.ProperyMethod = propertyMethod;
 }
 public ParameterNode(string name, int position, TypeDescriptor declaredType)
     : base(name, declaredType)
 {
     this.Position = position;
 }
 public MethodDescriptor(string classname, string methodName, bool isStatic = false, TypeDescriptor containingType = null, List<TypeDescriptor> parameters = null, TypeDescriptor returnType = null)
 {
     this.NamespaceName = "";
     this.ClassName = classname;
     this.MethodName = methodName;
     this.name = classname + "." + methodName;
     this.Parameters = new List<TypeDescriptor>();
     this.IsStatic = isStatic;
     this.ReturnType = returnType;
 }
 public FieldNode(string className, string fieldName, TypeDescriptor declaredType)
     : base(string.Format("{0}.{1}", className, fieldName), declaredType)
 {
     this.ClassName = className;
     this.Field = fieldName;
 }
 public AnalysisCallNode(string methodName, TypeDescriptor declaredType, LocationDescriptor location)
     : base(methodName, declaredType)
 {
     this.LocationDescriptor = location;
     this.InMethodOrder = location.InMethodOrder;
 }
        internal bool IsAssignable(TypeDescriptor t1, PropGraphNodeDescriptor analysisNode)
        {
            // Contract.Assert(this.codeProvider!=null);
            if(codeProvider==null)
            {
                return true;
            }

            var res = true;
            // Ugly
            TypeDescriptor type1 = t1;

            var type2 = analysisNode.Type;

            //			if (!type1.IsSubtype(type2))
            // Diego: This requires a Code Provider. Now it will simply fail.
            if (!this.codeProvider.IsSubtype(type1, type2))
            {
                if (!type2.IsDelegate)
                {
                    if (!IsCallNode(analysisNode) && !IsDelegateCallNode(analysisNode))
                    {
                        return false;
                    }
                }
            }
            //foreach(var t2 in ts.AsSet())
            //{
            //    AnalysisType type2 = (AnalysisType)t2;
            //    if (!type1.IsSubtype(type2))
            //        if (!IsCallNode(n) && !IsDelegateCallNode(n))
            //            return false;
            //}
            return res;
        }
 internal void Add(PropGraphNodeDescriptor n, TypeDescriptor t)
 {
     var v = AddVertex(n);
     v.Value.Elems.Add(t);
 }
 internal void Add(PropGraphNodeDescriptor n, TypeDescriptor t)
 {
     Vertex v = AddVertex(n);
     var data = GetData(v);
     data.Elems.Add(t);
     //((ISet<T>)v["Elems"]).Add(t);
 }