Exemplo n.º 1
0
 public ParameterizedType(ITypeDefinition genericType, IEnumerable <IType> typeArguments)
 {
     if (genericType == null)
     {
         throw new ArgumentNullException("genericType");
     }
     if (typeArguments == null)
     {
         throw new ArgumentNullException("typeArguments");
     }
     this.genericType   = genericType;
     this.typeArguments = typeArguments.ToArray();             // copy input array to ensure it isn't modified
     if (this.typeArguments.Length == 0)
     {
         throw new ArgumentException("Cannot use ParameterizedType with 0 type arguments.");
     }
     if (genericType.TypeParameterCount != this.typeArguments.Length)
     {
         throw new ArgumentException("Number of type arguments must match the type definition's number of type parameters");
     }
     for (int i = 0; i < this.typeArguments.Length; i++)
     {
         if (this.typeArguments[i] == null)
         {
             throw new ArgumentNullException("typeArguments[" + i + "]");
         }
         IResolved r = this.typeArguments[i] as IResolved;
         if (r != null && r.Compilation != genericType.Compilation)
         {
             throw new InvalidOperationException("Cannot parameterize a type with type arguments from a different compilation.");
         }
     }
 }
Exemplo n.º 2
0
 public IList<Resource> GetResourcesFor(IResolved d)
 {
     return m_cache.GetResourcesFor(d);
 }
Exemplo n.º 3
0
 public IList<Wish> FindWishesFor(IResolved d)
 {
     return m_cache.FindWishesFor(d);
 }
Exemplo n.º 4
0
 public Resource(IResolved dep, FileInfo fullPath, String vsProjectPath)
 {
     Dep = dep;
     File = fullPath;
     VSProjectPath = vsProjectPath;
 }