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