Beispiel #1
0
 public SharedTargetCmdGroup
     (IEnumerable <IInstallCmd> commands,
     InstallEntityPath targetPath)
 {
     this.commands   = new List <IInstallCmd>(commands);
     this.TargetPath = targetPath;
 }
 public SharedNestedTargetCmdGroup(
     IEnumerable <IInstallCmd> commands,
     InstallEntityPath targetPath,
     ContentPath nestedTargetPath,
     int priority)
 {
     this.commands         = new List <IInstallCmd>(commands);
     this.TargetPath       = targetPath;
     this.NestedTargetPath = nestedTargetPath;
     this.Priority         = priority;
 }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sourceObj"></param>
 /// <param name="pathToPrepend"></param>
 /// <returns></returns>
 public static String GetAbsoluteOrPrependIfRelative(this InstallEntityPath sourceObj, String pathToPrepend)
 {
     if (sourceObj.PathType == InstallEntityPathType.Absolute)
     {
         return(sourceObj.Value);
     }
     else if (sourceObj.PathType == InstallEntityPathType.Relative)
     {
         return(Path.Combine(pathToPrepend, sourceObj.Value));
     }
     else
     {
         throw new ArgumentException("The given path is not absolute or relative", "path");
     }
 }