private bool IsAssignableToCore(TypeParameterType self, IType type)
 {
     if (type is TypeParameterType t1)
     {
         if (t1.Name == self.Name)
         {
             return(true);
         }
         if (self.GetAllConstraints().Any(c => c.Equals(t1)))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
 public Substitution(TypeParameterType typeParameter, IType typeArgument)
 {
     this.typeParameter = typeParameter;
     this.typeArgument  = typeArgument;
 }
Exemplo n.º 3
0
        private string GenerateArgumentsForTypeInfo(TypeParameterType type)
        {
            var name = type.Name.AsString();

            return(name);
        }
 private bool IsAssignableToWithSubstitutionsCore(TypeParameterType self, IType type, ICollection <Substitution> substitutions)
 {
     return(false);
 }