public Context(Root root, Location location = null)
 {
     this.Root = root;
     this.Location = location ?? new Location();
 }
Exemple #2
0
 public Root(string sourcedir, string targetdir)
 {
     this.Source = new Location(sourcedir);
     this.Target = new Location(targetdir);
 }
 public Location Clone()
 {
     Location clone = new Location();
     clone.Directory = this.Directory;
     return clone;
 }
 public void MoveTo(string dir)
 {
     this.Location += new Location(dir); 
 }
 public static Location RelativeFrom(Location baseloc, Location relative)
 {
     return RelativeFrom(baseloc.Directory, relative.Directory);
 }
 public static Location RelativeFrom(Location baseloc, string dir)
 {
     return RelativeFrom(baseloc.Directory, dir);
 }
 public static Location RelativeFrom(string basedir, string dir)
 {
     Location location = new Location();
     location.Directory = Disk.RelativePath(basedir, dir);
     return location;
 }
 public static Location Combine(Location one, Location two)
 {
     Location result = new Location();
     result.Directory = Path.Combine(one.Directory, two.Directory);
     return result;
 }
Exemple #9
0
 public Root(string sourcedir, string targetdir)
 {
     this.Source = new Location(sourcedir);
     this.Target = new Location(targetdir);
 }