public void AddFrameworkReference(string name)
 {
     if (FrameworkReferences.Contains(name))
     {
         throw new InvalidOperationException("Cannot add existing reference. That would be a COMException in VS");
     }
     FrameworkReferences.Add(name);
 }
コード例 #2
0
 public Task AddFrameworkReferenceAsync(string name, string packageId)
 {
     if (FrameworkReferences.Contains(name))
     {
         throw new InvalidOperationException("Cannot add existing reference. That would be a COMException in VS");
     }
     FrameworkReferences.Add(name);
     return(Task.CompletedTask);
 }
 public bool ReferenceExists(string name)
 {
     return(References.ContainsKey(name) || FrameworkReferences.Contains(name));
 }
コード例 #4
0
 public Task <bool> ReferenceExistsAsync(string name)
 {
     return(Task.FromResult(References.ContainsKey(name) || FrameworkReferences.Contains(name)));
 }