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