コード例 #1
0
        private bool LoadTextFile(ITextFile textFile)
        {
            bool isLoadSuccessful = true;

            try
            {
                if (textFile.Load())
                {
                    this.log.Debug(textFile.FileName, "Loaded successfully.");
                }
                else
                {
                    this.log.Debug(textFile.FileName, "Needs to be analyzed first.");
                }
            }
            catch (SystemException exc)
            {
                this.log.Error(textFile.FileName, "Error: " + exc.Message);
                isLoadSuccessful = false;
                if (System.Diagnostics.Debugger.IsAttached)
                {
                    throw;
                }
            }

            return(isLoadSuccessful);
        }