Ejemplo n.º 1
0
 public Linkage(string name, string path, File file, LinkageCategoryEnum category)
 {
     if (string.IsNullOrEmpty(name)) throw new ArgumentException("Linkage must have a name node.");
     if (string.IsNullOrEmpty(path)) throw new ArgumentException("Linkage must have a path node.");
     if (file == null) throw new ArgumentException("Linkage must have a File node.");
     if (category == LinkageCategoryEnum.unknown) throw new ArgumentException("Linkage must have a category attribute.");
     this.name = name;
     this.path = path;
     this.file = file;
     this.category = category;
 }
Ejemplo n.º 2
0
 public Linkage(string name, string path, File file, LinkageCategoryEnum category)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new ArgumentException("Linkage must have a name node.");
     }
     if (string.IsNullOrEmpty(path))
     {
         throw new ArgumentException("Linkage must have a path node.");
     }
     if (file == null)
     {
         throw new ArgumentException("Linkage must have a File node.");
     }
     if (category == LinkageCategoryEnum.unknown)
     {
         throw new ArgumentException("Linkage must have a category attribute.");
     }
     this.name     = name;
     this.path     = path;
     this.file     = file;
     this.category = category;
 }