Exemple #1
0
 public LocalCommandLineTask(Path path, string command)
 {
     _path                 = path;
     WorkingDirectory      = Environment.CurrentDirectory;
     Command               = command;
     ExecutableIsLocatedAt = FindThePathToTheCommand(command);
 }
Exemple #2
0
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path, IDictionary<string, string> namespacePrefixes)
     : base(path)
 {
     _filePath = filePath;
     _replacementItems = replacementItems;
     _namespacePrefixes = namespacePrefixes;
 }
 public RenameTask(string target, string newName, Path path, bool deleteDestination = true)
 {
     _target = target;
     _newName = newName;
     _path = path;
     _deleteDestination = deleteDestination;
 }
Exemple #4
0
 public CopyFileTask(string @from, string to, string newFileName, Path path)
     : base(path)
 {
     _from = @from;
     _to = to;
     _newFileName = newFileName;
 }
 public CopyDirectoryTask(string @from, string to, DestinationCleanOptions options, Path path)
     : base(path)
 {
     _from = from;
     _to = to;
     _options = options;
 }
 public LocalCommandLineTask(Path path, string command)
 {
     _path = path;
     WorkingDirectory = Environment.CurrentDirectory;
     Command = command;
     ExecutableIsLocatedAt = FindThePathToTheCommand(command);
 }
Exemple #7
0
 public CopyDirectoryTask(string @from, string to, IList<Regex> copyIgnorePatterns, DestinationCleanOptions clearOptions, IList<Regex> clearIgnorePatterns, Path path)
     : base(path)
 {
     _from = from;
     _to = to;
     _copyIgnorePatterns = copyIgnorePatterns;
     _clearOptions = clearOptions;
     _clearIgnorePatterns = clearIgnorePatterns;
 }
Exemple #8
0
      public ExistsTask(Path path, string reason, List<string> filesShouldExist, List<string> directoriesShouldExist, List<string> filesShould_NOT_Exist, List<string> directoriesShould_NOT_Exist,
          bool shouldAbortOnError)
         : base(path) {
         _filesShouldExist = filesShouldExist ?? new List<string>();
         _directoriesShouldExist = directoriesShouldExist ?? new List<string>();
         _filesShould_NOT_Exist = filesShould_NOT_Exist ?? new List<string>();
         _directoriesShould_NOT_Exist = directoriesShould_NOT_Exist ?? new List<string>();

         _reason = reason;
         _shouldAbortOnError = shouldAbortOnError;
      }
Exemple #9
0
        public static void Save(object saveObject, string filename, ISerializer serializer)
        {
            FileSystem.Path path          = filename;
            var             saveDirectory = path.Directory;

            if (!Directory.Exists(saveDirectory))
            {
                Directory.CreateDirectory(saveDirectory);
            }

            serializer.Serialize(saveObject, filename);
        }
Exemple #10
0
        public ExistsTask(Path path, string reason, List <string> filesShouldExist, List <string> directoriesShouldExist, List <string> filesShould_NOT_Exist, List <string> directoriesShould_NOT_Exist,
                          bool shouldAbortOnError)
            : base(path)
        {
            _filesShouldExist            = filesShouldExist ?? new List <string>();
            _directoriesShouldExist      = directoriesShouldExist ?? new List <string>();
            _filesShould_NOT_Exist       = filesShould_NOT_Exist ?? new List <string>();
            _directoriesShould_NOT_Exist = directoriesShould_NOT_Exist ?? new List <string>();

            _reason             = reason;
            _shouldAbortOnError = shouldAbortOnError;
        }
Exemple #11
0
        public T Deserialize <T>(string filename) where T : new()
        {
            var result = new T();

            FileSystem.Path path = filename;
            if (path.Exists)
            {
                var type          = typeof(T);
                var xmlSerializer = new System.Xml.Serialization.XmlSerializer(type);
                using (var reader = new StreamReader(path))
                {
                    result = (T)xmlSerializer.Deserialize(reader);
                }
            }

            return(result);
        }
Exemple #12
0
 protected BaseIoTask(Path path)
 {
     _path = path;
 }
Exemple #13
0
 public XmlPokeTask(string filePath, IDictionary <string, string> replacementItems, IDictionary <string, string> replaceOrInsertItems, Path path)
     : this(filePath, replacementItems, replaceOrInsertItems, path, new Dictionary <string, string>())
 {
 }
Exemple #14
0
 public XmlPokeTask(string filePath, IDictionary <string, string> replacementItems, Path path, IDictionary <string, string> namespacePrefixes)
     : this(filePath, replacementItems, new Dictionary <string, string>(), path, namespacePrefixes)
 {
 }
Exemple #15
0
 public EmptyFolderTask(string to, Path path)
 {
     _to   = to;
     _path = path;
 }
Exemple #16
0
 public ExistsTask(Path path, string reason, List <string> filesShouldExist, List <string> directoriesShouldExist, List <string> filesShould_NOT_Exist, List <string> directoriesShould_NOT_Exist)
     : this(path, reason, filesShouldExist, directoriesShouldExist, filesShould_NOT_Exist, directoriesShould_NOT_Exist, false)
 {
 }
 public ExistsTask(Path path, string reason, List<string> filesShouldExist, List<string> directoriesShouldExist, List<string> filesShould_NOT_Exist, List<string> directoriesShould_NOT_Exist)
     : this(path, reason, filesShouldExist, directoriesShouldExist, filesShould_NOT_Exist, directoriesShould_NOT_Exist, false)
 {
 }
Exemple #18
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="replacementItems">these items will be replaced only if present in the source xml</param>
 /// <param name="replaceOrInsertItems">these items will be replace or added if not present in the source xml</param>
 /// <param name="path"></param>
 /// <param name="namespacePrefixes"></param>
 public XmlPokeTask(string filePath, IDictionary <string, string> replacementItems, IDictionary <string, string> replaceOrInsertItems, Path path, IDictionary <string, string> namespacePrefixes)
     : base(path)
 {
     _filePath             = filePath;
     _replacementItems     = replacementItems;
     _replaceOrInsertItems = replaceOrInsertItems;
     _namespacePrefixes    = namespacePrefixes;
 }
Exemple #19
0
 public EmptyFolderTask(string to, Path path)
 {
     _to = to;
     _path = path;
 }
 public CopyDirectoryTask(string @from, string to, IList <Regex> copyIgnorePatterns, DestinationCleanOptions clearOptions, IList <Regex> clearIgnorePatterns, Path path)
     : base(path)
 {
     _from = from;
     _to   = to;
     _copyIgnorePatterns  = copyIgnorePatterns;
     _clearOptions        = clearOptions;
     _clearIgnorePatterns = clearIgnorePatterns;
 }
Exemple #21
0
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path)
     : this(filePath, replacementItems, new Dictionary<string, string>(), path, new Dictionary<string, string>())
 {
 }
Exemple #22
0
 public FilePokeTask(string filePath, Encoding encoding, IList <FilePokeReplacement> replacements, FileSystem.Path path)
     : this(filePath, replacements, path)
 {
     _encoding = encoding;
 }
Exemple #23
0
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path)
     : base(path)
 {
     _filePath = filePath;
     _replacementItems = replacementItems;
 }
Exemple #24
0
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path, IDictionary<string, string> namespacePrefixes)
     : this(filePath, replacementItems, new Dictionary<string, Tuple<string, bool>>(), path, namespacePrefixes)
 {
 }
Exemple #25
0
 public CopyDirectoryTask(string @from, string to, DestinationCleanOptions options, Path path) : base(path)
 {
     _from    = from;
     _to      = to;
     _options = options;
 }
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path, IDictionary<string, string> namespacePrefixes)
     : this(filePath, replacementItems, new Dictionary<string, string>(), Enumerable.Empty<string>(), path, namespacePrefixes)
 {
 }
Exemple #27
0
 protected BaseIoTask(Path path)
 {
     _path = path;
 }
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, IDictionary<string, string> replaceOrInsertItems, IEnumerable<string> removeItems, Path path)
     : this(filePath, replacementItems, replaceOrInsertItems, removeItems, path, new Dictionary<string, string>())
 {
 }
Exemple #29
0
 public CopyFileTask(string @from, string to, string newFileName, Path path) : base(path)
 {
     _from        = from;
     _to          = to;
     _newFileName = newFileName;
 }
Exemple #30
0
 public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, IDictionary<string, Tuple<string, bool>> replaceOrInsertItems, Path path)
     : this(filePath, replacementItems, replaceOrInsertItems, path, new Dictionary<string, string>())
 {
 }
Exemple #31
0
 public FilePokeTask(string filePath, IList <FilePokeReplacement> replacements, FileSystem.Path path)
     : base(path)
 {
     _filePath     = path.GetFullPath(filePath);
     _replacements = replacements;
 }