public LocalCommandLineTask(Path path, string command) { _path = path; WorkingDirectory = Environment.CurrentDirectory; Command = command; ExecutableIsLocatedAt = FindThePathToTheCommand(command); }
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; }
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 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; }
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; }
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); }
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; }
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); }
protected BaseIoTask(Path path) { _path = path; }
public XmlPokeTask(string filePath, IDictionary <string, string> replacementItems, IDictionary <string, string> replaceOrInsertItems, Path path) : this(filePath, replacementItems, replaceOrInsertItems, path, new Dictionary <string, string>()) { }
public XmlPokeTask(string filePath, IDictionary <string, string> replacementItems, Path path, IDictionary <string, string> namespacePrefixes) : this(filePath, replacementItems, new Dictionary <string, string>(), path, namespacePrefixes) { }
public EmptyFolderTask(string to, Path path) { _to = to; _path = path; }
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) { }
/// <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; }
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; }
public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path) : this(filePath, replacementItems, new Dictionary<string, string>(), path, new Dictionary<string, string>()) { }
public FilePokeTask(string filePath, Encoding encoding, IList <FilePokeReplacement> replacements, FileSystem.Path path) : this(filePath, replacements, path) { _encoding = encoding; }
public XmlPokeTask(string filePath, IDictionary<string, string> replacementItems, Path path) : base(path) { _filePath = filePath; _replacementItems = replacementItems; }
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) { }
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) { }
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>()) { }
public CopyFileTask(string @from, string to, string newFileName, Path path) : base(path) { _from = from; _to = to; _newFileName = newFileName; }
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>()) { }
public FilePokeTask(string filePath, IList <FilePokeReplacement> replacements, FileSystem.Path path) : base(path) { _filePath = path.GetFullPath(filePath); _replacements = replacements; }