예제 #1
0
        /// <summary>
        /// Check if it is a File Conversion.
        /// Does the File Exist
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public bool CheckItsTypeConversion(string[] args)
        {
            if (args[0].StartsWith("F\\") == false
                | args[1].StartsWith("O\\") == false)
            {
                return(false);
            }

            if (args[0].Length < 4
                | args[1].Length < 4)
            {
                return(false);
            }

            InputConnection = args[0].Substring(2).ToLower();
            int iindex = InputConnection.IndexOf(".");

            if (iindex > -1)
            {
                InPutType = InputConnection.Substring(iindex + 1);
            }
            OutPutFileName = args[1].Substring(2).ToLower();
            iindex         = OutPutFileName.IndexOf(".");
            if (iindex == -1)
            {
                OutPutType     = OutPutFileName;
                OutPutFileName = InputConnection;
            }
            else
            {
                OutPutType     = OutPutFileName.Substring(iindex + 1);
                OutPutFileName = OutPutFileName.Substring(0, OutPutFileName.Length - OutPutType.Length);
            }
            if (args.Length > 2 && args[2].StartsWith("P\\") && args[2].Length > 2)
            {
                InputPatternType = args[2].Substring(2).ToLower();
            }

            return(true);
        }
예제 #2
0
        /// <summary>
        /// Check all the coverage for input and output settings.
        /// </summary>
        /// <returns></returns>
        internal virtual bool CheckCoverage()
        {
            if (CheckDataReachable() == false)
            {
                return(false);
            }

            if (IsInputTypeCovered() == false)
            {
                return(false);
            }

            if (IsOutputTypeCovered() == false)
            {
                return(false);
            }

            if (OutPutFileName.IndexOf(".") > -1)
            {
                OutPutFileName = ((Output)OutputWriter).FileName;
            }
            return(true);
        }