Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
        /// <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;
        }
Ejemplo n.º 3
0
        /// <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;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Release all resources acquired to implement and monitor this Cobol file
 /// </summary>
 public override void Dispose()
 {
     StopMonitoringExternalChanges();
     parentCobolLibrary = null;
     localFileInfo      = null;
 }
Ejemplo n.º 5
0
 /// <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;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Release all resources acquired to implement and monitor this Cobol file
 /// </summary>
 public override void Dispose()
 {
     StopMonitoringExternalChanges();
     parentCobolLibrary = null;
     localFileInfo = null;
 }