/// <summary> /// Add all Cobol files contained in a local directory, filtered by a set of extensions, to a specific text library named : libraryName /// </summary> /// <param name="libraryName">Name of the Cobol library, as specified in a Cobol program (COPY textName OF libraryName)</param> public LocalDirectoryLibrary AddLocalDirectoryLibrary(string libraryName, string rootPath, bool includeSubdirectories, string[] fileExtensions, Encoding encoding, EndOfLineDelimiter endOfLineDelimiter, int fixedLineLength) { LocalDirectoryLibrary localLibrary = new LocalDirectoryLibrary(libraryName, rootPath, includeSubdirectories, fileExtensions, encoding, endOfLineDelimiter, fixedLineLength); AddCobolLibrary(localLibrary); return(localLibrary); }
/// <summary> /// This version of the constructor is called by LocalDirectoryLibrary only /// </summary> internal LocalCobolFile(LocalDirectoryLibrary parentCobolLibrary, string name, string fullPath, Encoding encoding, EndOfLineDelimiter endOfLineDelimiter, int fixedLineLength) : base(name, encoding, endOfLineDelimiter, fixedLineLength) { localFileInfo = new FileInfo(fullPath); if (!localFileInfo.Exists) { throw new ArgumentException(String.Format("Full path for local Cobol file is invalid : {0}"), fullPath); } FullPath = localFileInfo.FullName; this.parentCobolLibrary = parentCobolLibrary; }
/// <summary> /// This version of the constructor is called by LocalDirectoryLibrary only /// </summary> internal LocalCobolFile(LocalDirectoryLibrary parentCobolLibrary, string name, string fullPath, Encoding encoding, EndOfLineDelimiter endOfLineDelimiter, int fixedLineLength) : base(name, encoding, endOfLineDelimiter, fixedLineLength) { localFileInfo = new FileInfo(fullPath); if(!localFileInfo.Exists) { throw new ArgumentException(String.Format("Full path for local Cobol file is invalid : {0}"), fullPath); } FullPath = localFileInfo.FullName; this.parentCobolLibrary = parentCobolLibrary; }
/// <summary> /// Release all resources acquired to implement and monitor this Cobol file /// </summary> public override void Dispose() { StopMonitoringExternalChanges(); parentCobolLibrary = null; localFileInfo = null; }
/// <summary> /// Add all Cobol files contained in a local directory, filtered by a set of extensions, to a specific text library named : libraryName /// </summary> /// <param name="libraryName">Name of the Cobol library, as specified in a Cobol program (COPY textName OF libraryName)</param> public LocalDirectoryLibrary AddLocalDirectoryLibrary(string libraryName, string rootPath, bool includeSubdirectories, string[] fileExtensions, Encoding encoding, EndOfLineDelimiter endOfLineDelimiter, int fixedLineLength) { LocalDirectoryLibrary localLibrary = new LocalDirectoryLibrary(libraryName, rootPath, includeSubdirectories, fileExtensions, encoding, endOfLineDelimiter, fixedLineLength); AddCobolLibrary(localLibrary); return localLibrary; }